Issue #718: Fonts may still be too large because the monitor on which a form is created has DPI > 100%. Calculate DpiScaleFactor based on that first monitor. See https://www.heidisql.com/forum.php?t=34230

This commit is contained in:
Ansgar Becker
2019-07-18 19:08:32 +02:00
parent 6a75e8c404
commit 2ebbdc6ba3
7 changed files with 24 additions and 22 deletions

View File

@ -184,11 +184,11 @@ begin
btnSave.Enabled := Modified;
btnDiscard.Enabled := Modified;
// Buttons are randomly moved, since VirtualTree update, see #440
btnSave.Top := Height - btnSave.Height - Round(3 * DpiScaleFactor(MainForm));
btnSave.Top := Height - btnSave.Height - Round(3 * MainForm.DpiScaleFactor);
btnHelp.Top := btnSave.Top;
btnDiscard.Top := btnSave.Top;
btnRunProc.Top := btnSave.Top;
btnRunProc.Left := Width - btnRunProc.Width - Round(3 * DpiScaleFactor(MainForm));
btnRunProc.Left := Width - btnRunProc.Width - Round(3 * MainForm.DpiScaleFactor);
Mainform.actRunRoutines.Enabled := DBObject.Name <> '';
Mainform.ShowStatusMsg;
Screen.Cursor := crDefault;