Skip to content

UI/Qt: Reset zoom button shows three digit numbers.#8889

Open
vgasparyan1995 wants to merge 1 commit intoLadybirdBrowser:masterfrom
vgasparyan1995:master
Open

UI/Qt: Reset zoom button shows three digit numbers.#8889
vgasparyan1995 wants to merge 1 commit intoLadybirdBrowser:masterfrom
vgasparyan1995:master

Conversation

@vgasparyan1995
Copy link
Copy Markdown

Issue

Zooming in or out makes a new "Reset zoom" button appear on the toolbar right between the Bookmark toggle and hamburger menu buttons. It shows the current zoom scale, 90% or 110%. The button was wide enough to show two digit percentages but not wide enough for three digit numbers, failing back to ....

Root cause

All the other buttons on this toolbar are square icons of size 16px x 16px. To make the bar look nicer and not have the icons too close to each other, a general style was applied to the toolbar to fix the size of those buttons to 24px x 24px. The text XX% happens to fit in this box, but XYZ% does not. It probably depends on the system font too.

Solution

I left the height of the toolbar buttons fixed to 24px but replaced the width with a horizontal padding of 4px on both sides. This has the same effect on the icon buttons and allows buttons with text to stretch to fit the text.

@ladybird-bot
Copy link
Copy Markdown
Collaborator

Hello!

One or more of the commit messages in this PR do not match the Ladybird code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@vgasparyan1995 vgasparyan1995 changed the title Reset zoom button shows three digit numbers. UI/Qt: Reset zoom button shows three digit numbers. Apr 14, 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