Is it possible Graphic Position Layout?
Yes, but to do that we need to override:
DrawText
CalculatePreferredSize
Isn't easy.
Wow it looks nice.
I've tested it on Windows 7 with standard DPI, it works fine. Autosize seems perfect. Of course I'm wondering if this could be applied to TBGRALabel.
Thanks.
I've compared standar button with bgrabutton in different dpi settings and I've noticed that the scaling of the 'Size Variables' is only neccesary in a ToolBar, not for common buttons, noticed after publishing 1.2.0.1. BTW some buttons in Windows (like in the File Open dialog) are bigger than the others, others are bigger only in Width.
Depending of the needs, we can change this code 'OnCreate' in TBGRAButton:
{$IFDEF WINDOWS}
// default sizes under different dpi settings
// ArrowSize, ArrowSpace, AutoSizeExtraVertical, AutoSizeExtraHorizontal.
SetSizeVariables(ScaleX(8,96), ScaleX(16,96), ScaleY(8,96), ScaleX(24,96));
{$ELSE}
// default sizes
SetSizeVariables(8, 16, 8, 24);
{$ENDIF}
Or use SetSizeVariables for each button we want to change the values ArrowSize, ArrowSpace, AutoSizeExtraVertical, AutoSizeExtraHorizontal.
If someone know the recommended values in other OS's post here.