Repository navigation
Show tab text at the system menu font size on scaled displays - #83
Merged
Merged
Conversation
The tab font was scaled by the display DPI on top of the system DPI that GDI already applies to point sizes, so at 125% scale tab text came out a quarter too large. It now only follows a monitor whose scale differs from the system one. The drag-and-drop hint uses the same font as the other tab tooltips.
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.
What changed
TabMetrics.fontnow scales the menu font's point size byDpi.value() / Dpi.system()instead ofDpi.value() / 96.TabMetrics.fontinstead ofSystemFonts.MessageBoxFont, so it matches the other tab tooltips and follows the monitor's scale.TabShadownow checks that the tab font equals the menu font at the system DPI and doubles at twice that DPI.Why
GDI already renders point sizes at the system DPI, so multiplying by
dpi / 96scaled the font twice. At 125% scale, tab text came out about 25% too large (about 19px instead of 15px). The Settings window and themed menus already usedpi / system, so tab text now matches them.Notes for reviewers
Every other font construction was checked and is already scaled correctly. Because the number badge, rename box and Appearance preview all use
TabMetrics.font, they get smaller as well on displays scaled above 100%. At 100% scale nothing changes.