Tooltips in a window are popups beside their widget, theme SVGs with plus-lighter highlights are no longer painted grey, and the folder-files icon is shaped as a folder
A tooltip was a layer-shell surface spanning the output, placed at the coordinates of its widget in the main surface. In a layer-shell shell the two share an origin, but an xdg-shell window does not know where it sits on screen, so in a window the tooltip appeared shifted by the window's position, wherever that put it. The application icons of the default theme, exported from Figma, light their glass with `feBlend mode="plus-lighter"`, which resvg does not know and paints as `normal`, so the highlights came out as grey edges; at dock size those edges cover whole pixels and the icon looks dirty. And `archives/folder-files`, the icon applications show for a folder, was a clipboard and a sheet rather than a folder. Tooltips. `tooltip_popup` tells when the tooltip must be an xdg-popup, that is when the main surface is a window and the widget is on it, and gives its anchor rect and logical size. `reconcile_overlays` then creates the tooltip's overlay as a popup child of the window, anchored to the widget's rect, above it with a 6 px gap (`TOOLTIP_GAP`), flipped below or slid sideways when it does not fit, so the compositor puts it beside the widget. It takes no grab and keeps the empty input region, so it never takes the pointer from the widget it describes. Its view is the pill centred in the popup. Layer-shell surfaces keep the previous placement, now in `tooltip_on_screen`. `tooltip_id` and `tooltip_size` hold the id and the estimated size both paths share. `OverlaySpec` is unchanged, so applications that build overlays need no change. Blend modes. `decode_svg_bytes` replaces `plus-lighter` with `screen`, the closest mode resvg supports, before parsing; a document without it is parsed as it comes, without a copy. A test covers both cases. The folder icon. Both variants of `archives/folder-files` are now the outline of `folder-empty` with the sheet of the previous icon inside, placed and sized as the lock of `folder-locked`: drawn in strokes in `line`, cut out of the filled folder in `filled`.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.000 25.000" fill="none">
|
||||
<g transform="translate(-499.500 -5091.500)" fill="#000000">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M502.441 5092.46C502.686 5092.17 503.047 5092 503.429 5092H512C512.381 5092 512.743 5092.17 512.987 5092.46C513.231 5092.75 513.333 5093.14 513.265 5093.52L513.224 5093.74C514.47 5093.92 515.429 5094.99 515.429 5096.29V5097.57H512.429C509.588 5097.57 507.286 5099.87 507.286 5102.71V5110.86H502.571C501.151 5110.86 500 5109.71 500 5108.29V5096.29C500 5094.99 500.958 5093.92 502.204 5093.74L502.164 5093.52C502.095 5093.14 502.197 5092.75 502.441 5092.46ZM504.969 5094.57L505.167 5095.66C505.278 5096.27 505.81 5096.71 506.432 5096.71H508.997C509.618 5096.71 510.151 5096.27 510.262 5095.66L510.459 5094.57H504.969Z"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M512.429 5099.71C510.772 5099.71 509.429 5101.06 509.429 5102.71V5113C509.429 5114.66 510.772 5116 512.429 5116H521C522.657 5116 524 5114.66 524 5113V5102.71C524 5101.06 522.657 5099.71 521 5099.71H512.429ZM513.5 5105.71C513.5 5105.12 513.98 5104.64 514.571 5104.64H518.857C519.449 5104.64 519.929 5105.12 519.929 5105.71C519.929 5106.31 519.449 5106.79 518.857 5106.79H514.571C513.98 5106.79 513.5 5106.31 513.5 5105.71ZM514.571 5108.93C513.98 5108.93 513.5 5109.41 513.5 5110C513.5 5110.59 513.98 5111.07 514.571 5111.07H518.857C519.449 5111.07 519.929 5110.59 519.929 5110C519.929 5109.41 519.449 5108.93 518.857 5108.93H514.571Z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.000 23.300" fill="none">
|
||||
<g transform="translate(-395.500 -5092.340)" fill="#000000">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M406.503 5093.38C406.039 5093.03 405.469 5092.84 404.886 5092.86H398.571C397.889 5092.86 397.235 5093.13 396.753 5093.61C396.271 5094.09 396 5094.75 396 5095.43V5112.57C396 5113.25 396.271 5113.91 396.753 5114.39C397.235 5114.87 397.889 5115.14 398.571 5115.14H417.429C418.111 5115.14 418.765 5114.87 419.247 5114.39C419.729 5113.91 420 5113.25 420 5112.57V5098.86C420 5098.17 419.729 5097.52 419.247 5097.04C418.765 5096.56 418.111 5096.29 417.429 5096.29H407.812L407.444 5094.81C407.303 5094.24 406.97 5093.74 406.503 5093.38ZM405 5099.859C403.84 5099.859 402.9 5100.804 402.9 5101.959V5109.162C402.9 5110.324 403.84 5111.262 405 5111.262H411C412.16 5111.262 413.1 5110.324 413.1 5109.162V5101.959C413.1 5100.804 412.16 5099.859 411 5099.859H405ZM405.75 5104.059C405.75 5103.646 406.086 5103.31 406.5 5103.31H409.5C409.914 5103.31 410.25 5103.646 410.25 5104.059C410.25 5104.479 409.914 5104.815 409.5 5104.815H406.5C406.086 5104.815 405.75 5104.479 405.75 5104.059ZM406.5 5106.313C406.086 5106.313 405.75 5106.649 405.75 5107.062C405.75 5107.475 406.086 5107.811 406.5 5107.811H409.5C409.914 5107.811 410.25 5107.475 410.25 5107.062C410.25 5106.649 409.914 5106.313 409.5 5106.313H406.5Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user