UI/Qt: Reset zoom button shows three digit numbers.#8889
Open
vgasparyan1995 wants to merge 1 commit intoLadybirdBrowser:masterfrom
Open
UI/Qt: Reset zoom button shows three digit numbers.#8889vgasparyan1995 wants to merge 1 commit intoLadybirdBrowser:masterfrom
vgasparyan1995 wants to merge 1 commit intoLadybirdBrowser:masterfrom
Conversation
Collaborator
|
Hello! One or more of the commit messages in this PR do not match the Ladybird code submission policy, please check the |
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.
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%or110%. 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 to24px x 24px. The textXX%happens to fit in this box, butXYZ%does not. It probably depends on the system font too.Solution
I left the height of the toolbar buttons fixed to
24pxbut replaced the width with a horizontal padding of4pxon both sides. This has the same effect on the icon buttons and allows buttons with text to stretch to fit the text.