Skip to content

feat: reduce jitter from bar resize with non-monospace fonts - #339

Open
waltmck wants to merge 3 commits into
wayle-rs:masterfrom
waltmck:minimize-bar-resize
Open

feat: reduce jitter from bar resize with non-monospace fonts#339
waltmck wants to merge 3 commits into
wayle-rs:masterfrom
waltmck:minimize-bar-resize

Conversation

@waltmck

@waltmck waltmck commented Jul 23, 2026

Copy link
Copy Markdown

Previously, bar buttons would often move around from left to right as displayed numbers changed. This caused other buttons and even open dropdowns to move around as well.

This PR mitigates that with a few layout heuristics:

  • Always reserve enough space as if every digit in your labels were the digit of maximum width, so the button width only changes if the number of digits changes
    • The only exception is date labels that change at most once per day (day, month, year, etc.) for which no extra space is reserved
  • For notifications and percentages, get rid of the leading zeroes and instead reserve the amount of space needed for 2 digits (things will still resize when you go to 3+ digits, but this is rare enough that it isn't as big a deal).

I also added non-zero-padded hours and days %-d and %-H and made these the new defaults, and disabled dropdown-freeze-label by default since it is no longer as big a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant