Re: Decreasing seams in scaled windows

"'Neil Hodgson' via scintilla-interest" <[email protected]> Tue, 16 Jun 2026 21:53:57 +1000
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
Mitchell:

> I found a bug though: on macOS when I use the API to change to PIXEL_ALIG=
NED scaling, all drawing shrinks by half (text is tiny).

> To clarify: a single increment will make drawing almost right (one point =
too big), and a single decrement will make drawing right (net zero zoom).


That makes it sound like a sequencing problem similar to earlier code on Li=
nux+Wayland where an incorrect initial scale was fixed subsequently. For th=
e Linux case, it was only necessary to choose a different encoding value as=
 that forced through a view reset. This was fixed by handling the QEvent::D=
evicePixelRatioChange event but I'm not getting that to occur on macOS.

OK, I have now seen something similar once when in the debugger which may h=
ave upset event handling. Perhaps the SetScaleProperty method needs to be c=
alled when handling Message::SetScaleTechnique inside ScintillaQt::WndProc =
although SetScaleProperty is called at the start of each paint.

> I imagine you are already aware, but just in case, some markers need to a=
djust their drawing to accommodate the new scale tech. For example, I am us=
ing box tree fold margin markers. When I double my margin size from 12 to 2=
4 with PIXEL_ALIGNED, I am getting the expected size, but the inner =E2=80=
=9C-=E2=80=9C and =E2=80=9C+=E2=80=9D symbols pretty much touch the boxes w=
hen they should be inset more (probably double).

I don't mind it myself but I can see that others wouldn't. Maybe change the=
 insetting of the symbol box with a factor based on a proportion of the box=
 size but with a minimum of the current value. The code is in LineMarker.cx=
x inside DrawSymbol.

Neil

--=20
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 e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-i=
nterest/4DAF6437-CC84-42F6-8994-F99C9B1248A2%40me.com.