ui: the tab glyphs are 32x16 pairs, drawn twice as wide
Each tab's icon is now two motifs side by side instead of one in a 16px square: the Measure pill is the two cursors beside the ruler, the Signals pill the trigger beside three channel rows. A 16px cell carries one motif — squeezing a pair into it is what turned both into a smear — and the pill has the width for a pair in a 300px column with two pills in it. Two measurements decided the size, both of which I had wrong from the outside: - **GDK paints an icon into a square box whatever the document's aspect.** `gtk_icon_theme_lookup_icon()` at 32 reports a `32x32` paintable for a 32x16 document, and librsvg fits it: rendered with aspect kept, the artwork comes out `32x16` inside a 32 request. So the pair is letterboxed, not stretched, and `pixel_size` 32 draws it at exactly the size it is written — 1:1, so the 2px bars stay crisp. A fractional scale (24 or 48) is what would blur them, which is why nothing here is drawn at one. - **The bar does not get taller for it.** `switcher: … icon=32x32 size=308x36`: 36px is what the switcher measured with 16px icons too, because the pill's fixed height takes a 32px box without growing. Both glyphs were drawn and then read back as ink maps rather than trusted: the first drafts came out at 39% and 44% ink (a blot beside the house 25–36%), and the tab bar is the last place a shape can be checked, since no screenshot works under this X setup. The finished two measure 23% and 33%. Verified: `switcher: policy=narrow pills=2 labels=0 names=2 icon=32x32 size=308x36`; `page icons: measure=udpscope-tab-measure-symbolic(ok) signals=udpscope-tab-signals-symbolic(ok)`; `[side-tab-probe] … advanced=4`; the Preferences dialog opened in the same run with no "not present"; `make test-ui` 14 files; zero `Gtk-CRITICAL`. The icons' GResource blob is 11661 bytes, still over the C99 limit, so the clean-build warning count stays four.
This commit is contained in:
1 parent
e615465366
commit
dbe6377415
9 files changed
+114
-47
No files matched your search
@@ -1,20 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- SPDX-License-Identifier: MIT -->
|
||||
<!-- SPDX-FileCopyrightText: 2026 Martino Ferrari -->
|
||||
<!-- The Signals tab: the trigger *and* the channel list it acts on, in one glyph. A rising edge
|
||||
crossing a dashed level is the trigger as the toolbar already draws it; below it, two rows of a
|
||||
colour chip and a name are the channel list, which is what the page mostly is. Two rows and not
|
||||
three, so the edge and the list each get half the cell: at 16px a third row costs the edge its
|
||||
clearance and the whole thing turns into a grid. Whole pixels, filled `path`s wound the same
|
||||
way, and the 2px bars match the house stroke weight. -->
|
||||
<svg height="16px" width="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#2e3436" d="M6 1 H8 V6 H6 Z
|
||||
M6 1 H15 V3 H6 Z
|
||||
M0 5 H2 V7 H0 Z
|
||||
M3 5 H5 V7 H3 Z
|
||||
M12 5 H14 V7 H12 Z
|
||||
M1 9 H4 V12 H1 Z
|
||||
M6 10 H14 V12 H6 Z
|
||||
M1 13 H4 V15 H1 Z
|
||||
M6 13 H14 V15 H6 Z"/>
|
||||
<!-- The Signals tab, as two motifs side by side in a 32x16 cell: the trigger on the left (a rising
|
||||
edge crossing a dashed level, the shape the toolbar's trigger button has) and three rows of a
|
||||
colour chip and a name on the right, which is the channel list the tab mostly is. Wider than
|
||||
tall because it has to hold *two* motifs: a 16px square cell can carry one, and squeezing the
|
||||
pair into it is what turns them into a smear. The pill renders this at 32, i.e. 1:1, so the 2px
|
||||
bars stay crisp; a fractional scale would blur them, which is why every coordinate is a whole
|
||||
pixel. GDK paints an icon into a *square* box whatever the document's aspect, so this pair is
|
||||
letterboxed in a 32x32 box rather than stretched (measured: a 32x16 render inside a 32 request).
|
||||
All subpaths are filled `path`s wound the same way. -->
|
||||
<svg height="16px" width="32px" viewBox="0 0 32 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#2e3436" d="M4 2 H6 V12 H4 Z
|
||||
M6 2 H14 V4 H6 Z
|
||||
M0 7 H2 V9 H0 Z
|
||||
M8 7 H10 V9 H8 Z
|
||||
M12 7 H14 V9 H12 Z
|
||||
M18 2 H21 V5 H18 Z
|
||||
M23 3 H30 V5 H23 Z
|
||||
M18 7 H21 V10 H18 Z
|
||||
M23 8 H30 V10 H23 Z
|
||||
M18 12 H21 V15 H18 Z
|
||||
M23 13 H30 V15 H23 Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.5 KiB |
Reference in new issue
Block a user