Re: Decreasing seams in scaled windows

Neil Hodgson <[email protected]> Thu, 11 Jun 2026 11:30:18 +1000
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <CACWkrThsBUAB=tpbkRtQP5wfmT1Zz4sr1b+qdjedfLn_SvFG2g@mail.gmail.com>
Some new changes should make non-scaled mode more like previous
versions although there are some regressions as well.

Widgets that may be scaled are now tagged with a "ScintillaScale"
property which is either the devicePixelRatioF to apply or 0.0 if
scaling is turned off. This allows scaling code dispersed in multiple
locations (like the Surface implementation) to more easily find the
correct factor to apply.

The line height may differ from the previous version. Scaled mode
chooses an integer line height (in screen space) whereas non-scaled
mode uses a fractional value so there will be change in layout between
modes but this change may be truncating instead of rounding or
similar.

The area invalidation code no longer updates the whole window in more
cases such as when the scale is an integer or its executing on Win32.
There may need to be more tweaks here, particularly for macOS which I
haven't checked.

There are problems with text size of calltips in unscaled mode on
Wayland with a fractional scale where it seems to use trunc(scale).

The problem with the vertical scroll bar not staying aligned to the
edge when the system scale is reduced on Win32 is still not fixed.
This may be a re-entrance issue in handling scale change notifications
and may require a deferred fixup task.

Calling the new mode "scaled" may be too loose as the previous
implementation did perform scaling. Perhaps a name based on "pixel
snapping" or "seam avoidance" may be better.

https://www.scintilla.org/QtScaleF.patch
https://www.scintilla.org/HavenScale3.zip

Neil

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/CACWkrThsBUAB%3DtpbkRtQP5wfmT1Zz4sr1b%2BqdjedfLn_SvFG2g%40mail.gmail.com.