mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1482: high DPI related: call RestoreListSetup in any FormShow event, not FormCreate, move FixVT again to FormShow
This commit is contained in:
@ -291,8 +291,6 @@ begin
|
|||||||
MakeFullyVisible;
|
MakeFullyVisible;
|
||||||
pnlLeft.Width := AppSettings.ReadInt(asSessionManagerListWidth);
|
pnlLeft.Width := AppSettings.ReadInt(asSessionManagerListWidth);
|
||||||
splitterMain.OnMoved(Sender);
|
splitterMain.OnMoved(Sender);
|
||||||
FixVT(ListSessions);
|
|
||||||
RestoreListSetup(ListSessions);
|
|
||||||
|
|
||||||
// Fix GUI stuff
|
// Fix GUI stuff
|
||||||
HasSizeGrip := True;
|
HasSizeGrip := True;
|
||||||
@ -401,6 +399,9 @@ var
|
|||||||
PSess: PConnectionParameters;
|
PSess: PConnectionParameters;
|
||||||
Node: PVirtualNode;
|
Node: PVirtualNode;
|
||||||
begin
|
begin
|
||||||
|
FixVT(ListSessions);
|
||||||
|
RestoreListSetup(ListSessions);
|
||||||
|
|
||||||
// Init sessions tree
|
// Init sessions tree
|
||||||
RefreshSessions(nil);
|
RefreshSessions(nil);
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ begin
|
|||||||
for i := 0 to ValueList.Count - 1 do
|
for i := 0 to ValueList.Count - 1 do
|
||||||
begin
|
begin
|
||||||
ColWidth := MakeInt(ValueList[i]);
|
ColWidth := MakeInt(ValueList[i]);
|
||||||
//ColWidth := RoundCommercial(ColWidth * OwnerForm.ScaleFactor);
|
ColWidth := OwnerForm.ScaleDesignToForm(ColWidth);
|
||||||
// Check if column number exists and width is at least 1 pixel
|
// Check if column number exists and width is at least 1 pixel
|
||||||
if (List.Header.Columns.Count > i) and (ColWidth > 0) and (ColWidth < 1000) then
|
if (List.Header.Columns.Count > i) and (ColWidth > 0) and (ColWidth < 1000) then
|
||||||
List.Header.Columns[i].Width := ColWidth;
|
List.Header.Columns[i].Width := ColWidth;
|
||||||
|
@ -120,10 +120,6 @@ begin
|
|||||||
//DragAcceptFiles(Handle, True);
|
//DragAcceptFiles(Handle, True);
|
||||||
Width := AppSettings.ReadInt(asFileImportWindowWidth);
|
Width := AppSettings.ReadInt(asFileImportWindowWidth);
|
||||||
Height := AppSettings.ReadInt(asFileImportWindowHeight);
|
Height := AppSettings.ReadInt(asFileImportWindowHeight);
|
||||||
RestoreListSetup(ListColumns);
|
|
||||||
RestoreListSetup(ListFiles);
|
|
||||||
FixVT(ListFiles);
|
|
||||||
FixVT(ListColumns);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -138,6 +134,10 @@ end;
|
|||||||
|
|
||||||
procedure TfrmInsertFiles.FormShow(Sender: TObject);
|
procedure TfrmInsertFiles.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
RestoreListSetup(ListColumns);
|
||||||
|
RestoreListSetup(ListFiles);
|
||||||
|
FixVT(ListFiles);
|
||||||
|
FixVT(ListColumns);
|
||||||
FConnection := Mainform.ActiveConnection;
|
FConnection := Mainform.ActiveConnection;
|
||||||
Caption := FConnection.Parameters.SessionName + ' - ' + MainForm.actInsertFiles.Caption;
|
Caption := FConnection.Parameters.SessionName + ' - ' + MainForm.actInsertFiles.Caption;
|
||||||
comboDBs.Items.Clear;
|
comboDBs.Items.Clear;
|
||||||
|
@ -240,6 +240,7 @@ begin
|
|||||||
ChildCount := Results.RecordCount;
|
ChildCount := Results.RecordCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmSQLhelp.treeTopicsInitNode(Sender: TBaseVirtualTree; ParentNode,
|
procedure TfrmSQLhelp.treeTopicsInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||||
var
|
var
|
||||||
|
@ -218,9 +218,6 @@ begin
|
|||||||
Width := AppSettings.ReadInt(asUsermanagerWindowWidth);
|
Width := AppSettings.ReadInt(asUsermanagerWindowWidth);
|
||||||
Height := AppSettings.ReadInt(asUsermanagerWindowHeight);
|
Height := AppSettings.ReadInt(asUsermanagerWindowHeight);
|
||||||
pnlLeft.Width := AppSettings.ReadInt(asUsermanagerListWidth);
|
pnlLeft.Width := AppSettings.ReadInt(asUsermanagerListWidth);
|
||||||
FixVT(listUsers);
|
|
||||||
FixVT(treePrivs);
|
|
||||||
RestoreListSetup(listUsers);
|
|
||||||
lblWarning.Font.Color := clRed;
|
lblWarning.Font.Color := clRed;
|
||||||
PrivsRead := Explode(',', 'SELECT,SHOW VIEW,SHOW DATABASES,PROCESS,EXECUTE');
|
PrivsRead := Explode(',', 'SELECT,SHOW VIEW,SHOW DATABASES,PROCESS,EXECUTE');
|
||||||
PrivsWrite := Explode(',', 'ALTER,CREATE,DROP,DELETE,UPDATE,INSERT,ALTER ROUTINE,CREATE ROUTINE,CREATE TEMPORARY TABLES,'+
|
PrivsWrite := Explode(',', 'ALTER,CREATE,DROP,DELETE,UPDATE,INSERT,ALTER ROUTINE,CREATE ROUTINE,CREATE TEMPORARY TABLES,'+
|
||||||
@ -290,6 +287,9 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
FixVT(listUsers);
|
||||||
|
FixVT(treePrivs);
|
||||||
|
RestoreListSetup(listUsers);
|
||||||
FColorReadPriv := clGreen;
|
FColorReadPriv := clGreen;
|
||||||
FColorWritePriv := clMaroon;
|
FColorWritePriv := clMaroon;
|
||||||
FColorAdminPriv := clNavy;
|
FColorAdminPriv := clNavy;
|
||||||
|
Reference in New Issue
Block a user