Skip to content

GSToolTips: size tooltips according to GSScaleFactor - #970

Merged
fredkiefer merged 2 commits into
gnustep:masterfrom
probonopd:fix-tooltip-scale-factor
Oct 18, 2026
Merged

fredkiefer merged 2 commits into
gnustep:masterfrom
probonopd:fix-tooltip-scale-factor

Conversation

@probonopd

@probonopd probonopd commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

GSToolTips: size the tooltip window for the user space scale factor

With a user space scale factor other than 1, tooltips are cut off: the window is made the size of the text as measured in points, but the window frame is in screen units, so it comes out too small by the scale factor.

To reproduce, run any application that sets a tool tip with -GSScaleFactor 1.3 (or set GSScaleFactor in NSGlobalDomain) and hover the view. A tooltip with cut off text is shown. With this change it is no longer cut off; at scale factor 1 nothing changes.

-[GSToolTips _timedOut:] now multiplies the measured text size by the window's userSpaceScaleFactor before creating the tooltip window; the window's content view is in points again, so the text fits it.

cc @pkgdemon

The tooltip window is made the size of the text as measured in points, but its frame is in screen units. With a user space scale factor other than 1 the window is too small by that factor and the text is cut off. Multiply the measured size by the window's scale factor before making the window.
@probonopd probonopd changed the title GSToolTips: size the tooltip window for the user space scale factor GSToolTips: size tooltips according to GSScaleFactor Sep 30, 2026
@fredkiefer
fredkiefer merged commit 87c1129 into gnustep:master Oct 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants