Re: Decreasing seams in scaled windows

John Ehresman <[email protected]> Mon, 25 May 2026 18:52:08 +0200
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
I=E2=80=99ve begun looking at this, though only with Haven so far. Haven do=
es show the issues with margin width / stroke width =E2=80=94 I mention it =
because I thought the INDIC_CONTAINER under the first two letters was a bug=
 because it renders as a one device pixel black line that looks like a seam=
 with the patched version of scintilla.

I plan to do more testing in the next few days.

Thanks,

John

> On May 25, 2026, at 5:32=E2=80=AFPM, Mitchell <[email protected]> wrote:
>=20
> Hi Neil,
>=20
>> On May 24, 2026, at 11:34=E2=80=AFPM, Neil <[email protected]> w=
rote:
>>=20
>> There were some more problems on current Wayland with the popups reporti=
ng a devicePixelRatioF of 2.0 when the system scale was 1.5 or 1.33. Its po=
ssible this is an initialization issue with windows not knowing an accurate=
 scaling factor before they receive a set scale message. It was fixed by us=
ing the devicePixelRatioF of the main Scintilla window in the attached patc=
h.
>>=20
>> Mitchell:
>>=20
>> I like the indicators that I see without the patch. Having multiple new =
scale-specific indicators doesn=E2=80=99t sound ideal.
>>=20
>> It's more likely you will be able to replace Diagonal with a single new =
DiagonalProportionalToDescender (or similar name) that implements a particu=
lar style of scaling diagonals. If there are different opinions on the best=
 technique to use then there could be more than one Diagonal*.
>=20
> That=E2=80=99s precisely what I=E2=80=99m concerned about. I use diagonal=
 and squiggly indicators. They would each need their own scaled versions, p=
ossibly with more permutations. My application would have to pick an indica=
tor based on detected scaling, etc. Right now, Qt already draws things corr=
ectly, even in my HiDPI Ubuntu 24.04 VM with 200% scaling.
>=20
>> A constraint here is that downstream Windows projects have been scaling =
for 6 years and shouldn't have their appearance modified in ways that they =
may not like or want.
>=20
> I think I could say my Mac project has been scaling for 6 years :) Or may=
be I misunderstand your meaning.
>=20
>> I increased my margin width using your new patch, but the markers remain=
ed the same, small size. Do I need to implement some sort of client-side sc=
aling?
>>=20
>> It is likely you will have to perform some scaling yourself.
>=20
> Okay, so another client-side branch based on whether or not the applicati=
on is running on a HiDPI display.
>=20
>> I did run into a strange issue with a Scintilla view that is normally 1 =
line high is now 2 lines high. However, I set the height using the SCI_TEXT=
HEIGHT, so I suspect Scintilla is reporting a new scaled height. Either I h=
ave to divide by two, or Scintilla (or its Qt platform) needs to do another=
 computation somewhere.
>>=20
>> I'm not sure. There are really two scales working in the code: graphics =
and windowing with window coordinates not being scaled.
>=20
> That=E2=80=99s what I was afraid of. Now I need to become an expert to kn=
ow the difference between what units Scintilla=E2=80=99s APIs are reporting=
, and what units the Window toolkit is reporting.
>=20
>> I would like some sort of control to disable scaling and keep the defaul=
t drawing Scintilla Qt is doing on my Retina and 4K display (I assume macOS=
 is doing 200% scaling for both). When I have time, I can enable scaling an=
d then identify and report any issues I find, as I am now. Right now it fee=
ls like I=E2=80=99m going to run into a lot of small things over time rathe=
r than all at once. I=E2=80=99d be more comfortable with the fallback to di=
sable and keep the current drawing.
>>=20
>> I have been working on this but scaling occurs in many places and the 's=
caled' control property needs to be distributed and kept current.
>=20
> I understand. It=E2=80=99s a hard issue with a non-zero maintenance burde=
n.
>=20
> Ultimately I will accept and adjust to whatever changes you make. I=E2=80=
=99m just offering my feedback now at this early stage for what it=E2=80=99=
s worth.
>=20
> Cheers,
> Mitchell
>=20
> --=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=
 email to [email protected].
> To view this discussion visit https://groups.google.com/d/msgid/scintilla=
-interest/96031856-CB8D-45BE-9B32-3ADC515E511B%40foicica.com.

--=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/F3EBC929-1B67-412A-8C1F-174A60108ADC%40wingware.com.