mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1656: Upscale status bar panels in non-96-DPI mode, so text is not cut off.
This commit is contained in:
@ -1183,6 +1183,7 @@ var
|
||||
dwWnd: DWORD; // Handle for the size call.
|
||||
FI: PVSFixedFileInfo; // Delphi structure; see WINDOWS.PAS
|
||||
ptrVerBuf, Translation, Info: Pointer;
|
||||
DpiScaleFactor: Double;
|
||||
begin
|
||||
caption := APPNAME;
|
||||
setLocales;
|
||||
@ -1241,6 +1242,10 @@ begin
|
||||
InheritFont(tabsetQueryHelpers.Font);
|
||||
InheritFont(SynCompletionProposal.Font);
|
||||
StatusBar.Height := GetTextHeight(StatusBar.Font)+4;
|
||||
// Upscale panels in non-96-DPI mode
|
||||
DpiScaleFactor := Screen.PixelsPerInch / FORMS_DPI;
|
||||
for i:=StatusBar.Panels.Count-1 downto 1 do
|
||||
StatusBar.Panels[i].Width := Round(StatusBar.Panels[i].Width * DpiScaleFactor);
|
||||
|
||||
// Enable auto completion in data tab, filter editor
|
||||
SynCompletionProposal.AddEditor(SynMemoFilter);
|
||||
|
Reference in New Issue
Block a user