Skip to content

fix: icons on their own sit in the middle of their boxes - #30

Merged
vdmkenny merged 1 commit into
mainfrom
fix/centred-icons
Oct 15, 2026
Merged

vdmkenny merged 1 commit into
mainfrom
fix/centred-icons

Conversation

@vdmkenny

Copy link
Copy Markdown
Contributor

The icons' font gives each icon a wider advance than its own, with the icon in its middle, so that a column of icons beside text lines up (fonts.mergeIcons). Icon-only buttons centred the icon as if it were only as wide as its size, so each sat about 2 points right of the middle, such as the outline's + and the toolbar's step, pause and square.

widgets.drawIconCentered centres the advance instead. The icon-only buttons use it, and so do the icons on their own that were placed by hand to make up for the shift: the checkbox's tick, the inspector's tile, the start screen's tiles, the Keys page's pencil and the gutter's problem icon. Icons beside text keep their place.

Measured on the drawn pixels, the toolbar's square had 19 and 11 device pixels of space on its left and right, and now has 15 and 15, with 13 above and below.

Checks: make check (58 tests), and the screens drawn and compared before and after.

The icons' font gives each icon a wider advance with the icon in its
middle, so that a column of icons beside text lines up. Icon-only
buttons centred the icon as if it were only as wide as its size, so
each one sat about 2 points right of the middle, and other icons on
their own were placed by hand to make up for it. They now centre the
advance (`widgets.drawIconCentered`).
@vdmkenny
vdmkenny merged commit 58c23a4 into main Oct 15, 2026
3 checks passed
@vdmkenny
vdmkenny deleted the fix/centred-icons branch October 15, 2026 10:26
vdmkenny pushed a commit that referenced this pull request Oct 15, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.2.0](v0.1.1...v0.2.0)
(2026-10-15)


### Features

* edit a mission's records in the inspector, and add new ones
([#28](#28))
([104aac1](104aac1)),
closes [#8](#8)
* the Scene view maps a mission's ships, markers, ranges and routes
([#31](#31))
([4e5061e](4e5061e)),
closes [#2](#2)


### Fixes

* icons on their own sit in the middle of their boxes
([#30](#30))
([58c23a4](58c23a4))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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