Skip to content

feat: Replace toolbar PNG icons with scalable SVG icons - #101

Open
sywung wants to merge 1 commit into
sanny32:devfrom
sywung:ui/hidpi-svg-icons
Open

sywung wants to merge 1 commit into
sanny32:devfrom
sywung:ui/hidpi-svg-icons

Conversation

@sywung

@sywung sywung commented Nov 18, 2026 •

Copy link
Copy Markdown

Summary

The toolbar icons are 16x15 px PNGs, while the toolbars use a 24x24 icon size. On HiDPI/Retina screens (and on Windows with display scaling > 100%) they are upscaled ~3x and look blurry.

This PR redraws all 35 toolbar icons as 24x24 SVGs, so they stay sharp at any scale factor.

Related to #98 — with vector icons the toolbar icon size can also be increased later without losing quality.

Screenshots (macOS, Retina)

Before

toolbar before

After

toolbar after

Changes

  • Add src/app/res/icons/*.svg (35 icons, same base names as the old PNGs)
  • src/ui/mainwindow.ui, src/app/resources.qrc: reference the SVGs instead of the PNGs
  • Remove the PNGs that are no longer referenced

Design notes

  • Keeps the original meaning and the classic palette of the old icons: navy title bars, olive/yellow folder and floppy, yellow question mark, cyan glasses, etc.
  • Data format labels (010, 0xA, i16, u32, .64, ...) are glyph outlines of Fira Mono Bold (SIL OFL 1.1) converted to paths, so the result does not depend on installed fonts.
  • Function code buttons (05, 06, 15, 16, 22, U) use the regular weight to visually separate them from the data format buttons.
  • Swapped formats and Byte Order use a red (top) / blue (bottom) arrow pair.
  • Plain SVG Tiny (no CSS, filters or text elements), rendered by the existing QtSvg dependency.

Test

  • Built dev with Qt 6.12 on macOS 27.2 (Apple Silicon) — builds and runs, all toolbar icons render correctly in enabled and disabled states.
  • Not tested on Windows/Linux, but no platform-specific code is involved.

The toolbar icons were 16x15 pixel PNGs drawn at 24x24, so they were
upscaled and looked blurry on HiDPI/Retina displays and on Windows with
display scaling above 100%.

- Redraw all 35 toolbar icons as 24x24 SVGs (src/app/res/icons/)
- Keep the original meaning and classic palette (navy title bars, olive,
  yellow, red/blue swap arrows, cyan glasses)
- Data format labels (i16, u32, .64, ...) are glyph outlines from
  Fira Mono (SIL OFL 1.1), so rendering does not depend on system fonts
- Swapped formats and Byte Order use a red (top) / blue (bottom) arrow pair
- Update mainwindow.ui and resources.qrc, remove the unused PNGs

This branch has not been deployed

No deployments
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