John Ehresman:
> to add *F() variants of methods that take or return pixel values — these mimic how Qt works by always working in (possibly fractional) pixel units.
Tagging APIs that take or return pixels is good.
Scripts that read Scintilla.iface will need to be updated to
understand 'pixels'. Some of these are in Scintilla
(ScintillaAPIFacer.py, CheckMentioned.py) and SciTE (IFaceTableGen.py)
but some are in external projects.
Since this could cause failures in these projects, I'd like to provide
some transition support. Perhaps by publishing a script that converts
'int' into 'pixels' in Scintilla.iface where appropriate so projects
could update on their own schedule then force the update in a release
or two.
There will be decisions on how to expose this: does ScintillaTypes.h
get a 'using Pixels = intptr_t;' with ScintillaCall.h then specifying
'Pixels' in methods? Is the documentation updated or left with 'int'?
> The second patch uses full repaints on macOS because I intermittently see a one pixel of selection color when I select and deselect lines (though I can trigger it pretty easily).
Yes, I have seen this too and do not understand it. It would be more
understandable if it happened on line edges where a float to int
rounding could cause a gap in painting but the selection remnant can
appear well inside a line. If it was just an edge truncation then
expanding the rectangle a little up and down would fix it but that
doesn't work.
For PixelAligned scaling, there is a performance cost to redrawing the
whole screen range, so accurate invalidation could be followed by
restricting painting to just the necessary area in the future.
> The patch also fixes the initial tiny text problem and a scroll by lines bug.
They look good.
I have applied QtScale-platform-fixes.patch and attached is a combined patch.
Neil