Skip to content

Show tab text at the system menu font size on scaled displays - #83

Merged
leafOfTree merged 1 commit into
mainfrom
tab-font-size
Oct 18, 2026
Merged

leafOfTree merged 1 commit into
mainfrom
tab-font-size

Conversation

@leafOfTree

Copy link
Copy Markdown
Owner

What changed

  • TabMetrics.font now scales the menu font's point size by Dpi.value() / Dpi.system() instead of Dpi.value() / 96.
  • The drag-and-drop hint over the tab strip uses TabMetrics.font instead of SystemFonts.MessageBoxFont, so it matches the other tab tooltips and follows the monitor's scale.
  • TabShadow now 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 / 96 scaled 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 use dpi / 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.

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.
@leafOfTree
leafOfTree merged commit fdc7b94 into main Oct 18, 2026
6 checks passed
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.

1 participant