Repository navigation
fix: icons on their own sit in the middle of their boxes - #30
Merged
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.drawIconCenteredcentres 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.