Skip to content

Toolbar icons: larger glyphs (about 14 px in a 16 px icon) - #301

Merged
danjboyd merged 1 commit into
mainfrom
toolbar-glyph-size
Oct 20, 2026
Merged

danjboyd merged 1 commit into
mainfrom
toolbar-glyph-size

Conversation

@danjboyd

@danjboyd danjboyd commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

For 0.3.2. Dan's decision on the toolbar-size report (https://claude.ai/artifact/5g34jF2VfEnMyeoz7T8XuS), item 1.

What changes. The toolbar's glyphs fill about 85% of their icon instead of about 62%. In WinUITheme's 16 px toolbar icon they come out at about 14 px instead of 10. Snipping Tool and Photos use 14–16 px.

How. Assets only, no new art. The SVGs draw inside 3–21 of their 24-unit grid. scripts/render_toolbar_icons.py now renders that middle 18 units at every size, and all the -NN-symbolic.png files are re-rendered with it. The 16 px hinted drawings for NumberedStep and Rectangle are removed, because they were hinted to the old scale.

Every platform gets this: GNUstep (WinUITheme, Adwaita and the default theme) and macOS use these PNGs.

Not in this PR: the wider gaps between groups (item 2). They come from the theme (WinUIThemeToolbarSpacing), and WinUITheme alpha11's 40 px toolbar sets them to 4 pt per side.

Testing

  • The unchanged script reproduces the committed PNGs byte for byte with this toolchain (UCRT64 librsvg + pycairo), so the only diff is the crop.
  • Windows: preview 0.3.1-pr301. Glyphs went from 9–10 px to 12–14 px at 100%, and from 14–16 px to 18–20 px at 150% (see the comments).
  • Linux: Adwaita and the default theme at 1× and 2×: larger and crisp, nothing clipped (see the comments).
  • macOS: glyphs about 16–20 pt instead of 13–15 pt; nothing clipped; overflow identical to main (see the comments).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Px6i2CANZszJmJLzAZHoBQ

The toolbar SVGs draw their art inside 3 to 21 of a 24-unit grid, and
render_toolbar_icons.py rendered the whole grid. So a glyph filled
about 62% of its icon: in WinUITheme's 16 px toolbar icon it came out
10 px, where Snipping Tool and Photos draw 14 to 16 px.

The script now renders the middle 18 units at every size, so the same
art comes out about 14 px at 16 px. The art itself is unchanged. The
16 px hints for NumberedStep and Rectangle are gone: they were hinted
to the old 16 px scale and lose their edges at the new one.

All PNGs re-rendered with the script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Px6i2CANZszJmJLzAZHoBQ
@danjboyd

Copy link
Copy Markdown
Owner Author

Linux check (391be47 against main beaa38b): looks good. Private GNOME Shell (X11), at 1× and 2× (GSScaleFactor 2), under Adwaita and GNUstep's default theme.

  • Glyph size: clearly larger in every tool button, undo/redo and Share, and about as big as Adwaita's own window-control icons. They now fill the tool buttons the way GTK's toolbar icons do.
  • Clipping and weight: no icon is clipped at 1× or 2× in either theme. The stroke weight reads the same as before, just larger. NumberedStep and Rectangle, which lost their 16 px hinted drawings, stay crisp at 1×.
  • Default theme: the bordered tool cells still have room around each glyph; nothing touches a cell edge.
  • Overflow: items move into » at the same window widths as on main (checked at 1400, 1100, 900 and 700 pt). Icons only, so no item's width changed.
  • Tests: not re-run for this assets-only change.
  • Not covered: the narrow-window tool switcher. At 700 pt all the tools are in », and I didn't open that menu.

🤖 Generated with Claude Code

@danjboyd

Copy link
Copy Markdown
Owner Author

Windows: GO. I tested preview MSI 0.3.1-pr301 (run 39469845166, 391be47) on Windows 11 with WinUITheme alpha10, against rc2. Measured from PrintWindow captures:

Glyph 100% before → after 150% before → after
Tools (pen, arrow, text, step, redact, eraser…) 9–10 → 12–14 px 14–16 → 18–20 px (12–13 epx)
Rectangle 12×9 → 16×12 18×14 → 24×18
Share 8×10 → 12×14 12×16 → 16×20

The toolbar layout, targets and row height are unchanged, with nothing clipped and nothing in ». Dark mode at 150% also looks right.

Before/after strips at 100% and 150% (1:1) are in section 5 of the toolbar report: https://claude.ai/artifact/5g34jF2VfEnMyeoz7T8XuS (private to Dan's account).

Item 2 (wider gaps) is now in WinUITheme's toolbar-40 work for alpha11: 4 pt per side, 8 between items. It isn't needed in this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Px6i2CANZszJmJLzAZHoBQ

@danjboyd

Copy link
Copy Markdown
Owner Author

macOS check (391be47 against main beaa38b): looks good. macOS 26, arm64 build (scripts/build_cocoa.sh), side by side with v0.3.1-rc2 (= main). Light and dark. The display here is 1× (1920×1080), so the 2× look is judged from the @2x PNGs, not a Retina screen.

  • Glyph size: clearly larger on screen. Measured at 1× on the toolbar, main's glyphs are about 13–15 pt and Toolbar icons: larger glyphs (about 14 px in a 16 px icon) #301's about 16–20 pt (Copy 22, Save 20). The toolbar draws the 22 pt reps (44 px at 2×). Share is NSSharingServicePickerToolbarItem, which draws macOS's own share symbol; it's 14×18 pt on both builds. So our icons now match the system symbol's height (main's were a little smaller). Copy and Save are a touch bigger than it.
  • Weight: strokes scale with the glyph (1.5 units → about 1.8 px at 22 pt), so they read a little heavier than macOS's regular-weight share symbol beside them. Save, Copy, Redact and Preferences show it most. It looks fine to me in both light and dark; nothing looks blobby.
  • Clipping: none, at any size. Rectangle comes closest: its stroke spans 3.25–20.75 of the 3–21 crop, so at 16 px it's within about 0.2 px of the edge but not cut. MarqueeTool and Preferences stay inside too.
  • 1×, without the hinted 16 px drawings: the toolbar doesn't use the 16 px reps on macOS (it draws at 22 pt), so removing NumberedStep-16 and Rectangle-16 changes nothing on screen here. Both look crisp in the toolbar.
  • Overflow: the same as main at every width I tried (1100, 1000, 960, 940, 920, 900, 880, 860, 840, 800, 760, 700 and 640 pt; I compared toolbar item counts via accessibility). Expected, since the gap change isn't in this PR.
  • Tool switcher: the 9 tool buttons look as above in both appearances. Pre-existing, the same on main: below about 800 pt the tool group runs past the window's right edge instead of collapsing into ».
  • Tests: not re-run (assets only).

macOS GO for #301. The merge is Dan's call.

🤖 Generated with Claude Code

@danjboyd

Copy link
Copy Markdown
Owner Author

Correction to my note above: "below about 800 pt the tool group runs past the window's right edge" came from resizing through accessibility, which bypasses the window's minimum width. Dragged by hand, main's window stops at 772 pt with the tools showing (details on #303). This doesn't change the GO for #301.

🤖 Generated with Claude Code

@danjboyd
danjboyd marked this pull request as ready for review October 20, 2026 21:02
@danjboyd
danjboyd merged commit d9f1baf into main Oct 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant