8000 fix(sidebar): centre the count in the unread chip by valentin-morice · Pull Request #545 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content

fix(sidebar): centre the count in the unread chip - #545

Closed
valentin-morice wants to merge 1 commit into
hyprlab:mainfrom
valentin-morice:fix/sidebar-badge-centring
Closed

valentin-morice wants to merge 1 commit into
hyprlab:mainfrom
valentin-morice:fix/sidebar-badge-centring

Conversation

@valentin-morice
@valentin-morice valentin-morice commented Oct 29, 2026 •
Copy link
Copy Markdown
Contributor

At the default font size (Adwaita Sans 11, 1x) the sidebar's unread chip draws its count above centre: a single digit has three rows of accent above it and six below.

This moves one pixel from min-height into padding-top, so the chip keeps its 18px height and the count drops by a pixel, to four rows above and five below. That is as close as a 9px digit gets in an 18px chip.

Tested:

  • Built with the Flatpak manifest (GNOME 50 SDK, rust-stable) and run on Fedora 44 against an IMAP account: the chip stays 18px and the digit sits four rows from the top and five from the bottom (was three and six).
  • Rendered the rule in the GNOME 50 runtime (GTK 4.22) at 1x, 1.25x, 1.5x and 2x text scale: the digit goes from 1.5, 0.5, 0.5 and 0px above centre to 0.5, 0, 0 and 0px. At 1.25x and above the chip is 1px taller than before.
  • .unread-badge-mini sets its own padding and min-height, so the compact rail's corner chips are unchanged.
hylki-unread-badge-before-after

At the default font size the sidebar's unread count drew 1.5px above the centre of its 18px chip, three rows of accent above a single digit and six below. One pixel of top padding, taken from min-height so the chip keeps its height, brings it to within half a pixel at 1x and centres it at 1.25x and 1.5x text scale.
@hyprlab
hyprlab commented Oct 29, 2026
Copy link
Copy Markdown
Owner

Hey thanks for the PR, I hadn't noticed this much of a vertical center issue on my machine but I'm glad it will be fixed. This will be landing in today's stable build 1.46.0 with your credit :)

hyprlab added a commit that referenced this pull request Oct 29, 2026
At the default font size the count sat 1.5px above the middle of the 18px chip. A pixel moves from min-height into the top padding, so the chip keeps its height.

Co-Authored-By: Valentin Morice <100000204+valentin-morice@users.noreply.github.com>
hyprlab added a commit that referenced this pull request Oct 29, 2026
hyprlab added a commit that referenced this pull request Oct 29, 2026
Everything from 1.46.0-beta.1 to 1.46.0-beta.5, plus main since: #547, #548, #549, #545, #546, lone card folding and marks, the AppImage and the ARM packages.
@hyprlab
hyprlab commented Oct 29, 2026
Copy link
Copy Markdown
Owner

Agentic reply:

The build is in the repo now: flatpak update picks it up.

@hyprlab hyprlab closed this Oct 29, 2026
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.

2 participants

0