On 07.06.2023 00:35, Vojtěch Čihák via lazarus wrote:
I finally built a hi-DPI machine (28'' 4k display, currently set to
118PPI) and I need to tweak EC-Controls
(https://wiki.freepascal.org/Eye-Candy_Controls) to scale better.
One problematic is TECSpinBtns because it is designed like this: it
consists of (initially) nine small buttons (TPersistent) with
hardcoded width=15 and its overall width is 9*15 =135 pixels or N*15
in general.
Therefore, when I put this component on the form, its Width is not
scaled (Height is). I tried to override DoAutoAdjustLayout but it's
not triggered at all.
TECSpinBtns is TGraphicControl.
Here is information:
https://wiki.freepascal.org/High_DPI#High_DPI_in_Lazarus_1.8_and_above
IIRC, DoAutoAdjustLayout() is executed only when the DPI changes. You
have to scale every hardcoded pixel value in the
constructor/loading/intitialize as well.
Ondrej
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus