Open ronaldruijs opened 7 years ago
Same problem with styled applications produced by Delphi 10.2x and having the DPI aware project option checked.
Lack of support of DPI aware applications is by far the most serious limitation/bug of VCL Styles. I have created a fix which I would like to contribute to the vcl-styles-utils project.
To use the unit just add it to the implementation uses statement of the main form and add the following code to the FormCreate handler.
procedure TFrmMain.FormCreate(Sender: TObject);
Var
StyleDPIAwareness : TStyleDPIAwareness;
begin
StyleDPIAwareness := TStyleDPIAwareness.Create(Self);
StyleDPIAwareness.Parent := Self;
By default the component scales the styles at multiples of 100%. You can change that, by adding the line:
StyleDPIAwareness.RoundScalingFactor := False;
With this statement styles are scaled to whatever scaling factor results for Screen.PixelsPerInch. Most of the styles would work fine, but a few may show some visual defects.
Vcl Styles Basic Demo (Demo App).zip Hello,
Refer to attached zip file. It contains your basic demo, modified to be DPI Aware, by adding a manifest. Everything works OK, except for the window caption, which is too small. Am I overlooking something?
Best regards,
Ronald