
this happens because user has enabled Text Zoom in Windows settings. The problem arises from the fact that Windows automatically scales text according to user settings, but not forms and control placement (which you specify in pixels in plugins).
Take a look at this regular plugin code dealing with GUI:
Code: Select all
f = new TForm(WeBuilder);
f.Width = 600;
f.Height = 670;
var pnlCurrentWBProject = new TPanel(f);
pnlCurrentWBProject.Parent = f;
pnlCurrentWBProject.SetBounds(14, 10, 568, 80);
Here's how to fix it and make it DPI-aware:
Code: Select all
f = new TForm(WeBuilder);
var mul = Round(f.PixelsPerInch / 96);
f.Width = 600 * mul;
f.Height = 670 * mul;
var pnlCurrentWBProject = new TPanel(f);
pnlCurrentWBProject.Parent = f;
pnlCurrentWBProject.SetBounds(14 * mul, 10 * mul, 568 * mul, 80 * mul);
I hope that helps!