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;
|
||||
pnlLeft.Width := AppSettings.ReadInt(asSessionManagerListWidth);
|
||||
splitterMain.OnMoved(Sender);
|
||||
FixVT(ListSessions);
|
||||
RestoreListSetup(ListSessions);
|
||||
|
||||
// Fix GUI stuff
|
||||
HasSizeGrip := True;
|
||||
@ -401,6 +399,9 @@ var
|
||||
PSess: PConnectionParameters;
|
||||
Node: PVirtualNode;
|
||||
begin
|
||||
FixVT(ListSessions);
|
||||
RestoreListSetup(ListSessions);
|
||||
|
||||
// Init sessions tree
|
||||
RefreshSessions(nil);
|
||||
|
||||
|
@ -326,7 +326,7 @@ begin
|
||||
for i := 0 to ValueList.Count - 1 do
|
||||
begin
|
||||
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
|
||||
if (List.Header.Columns.Count > i) and (ColWidth > 0) and (ColWidth < 1000) then
|
||||
List.Header.Columns[i].Width := ColWidth;
|
||||
|
@ -120,10 +120,6 @@ begin
|
||||
//DragAcceptFiles(Handle, True);
|
||||
Width := AppSettings.ReadInt(asFileImportWindowWidth);
|
||||
Height := AppSettings.ReadInt(asFileImportWindowHeight);
|
||||
RestoreListSetup(ListColumns);
|
||||
RestoreListSetup(ListFiles);
|
||||
FixVT(ListFiles);
|
||||
FixVT(ListColumns);
|
||||
end;
|
||||
|
||||
|
||||
@ -138,6 +134,10 @@ end;
|
||||
|
||||
procedure TfrmInsertFiles.FormShow(Sender: TObject);
|
||||
begin
|
||||
RestoreListSetup(ListColumns);
|
||||
RestoreListSetup(ListFiles);
|
||||
FixVT(ListFiles);
|
||||
FixVT(ListColumns);
|
||||
FConnection := Mainform.ActiveConnection;
|
||||
Caption := FConnection.Parameters.SessionName + ' - ' + MainForm.actInsertFiles.Caption;
|
||||
comboDBs.Items.Clear;
|
||||
|
@ -240,6 +240,7 @@ begin
|
||||
ChildCount := Results.RecordCount;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmSQLhelp.treeTopicsInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
var
|
||||
|
@ -218,9 +218,6 @@ begin
|
||||
Width := AppSettings.ReadInt(asUsermanagerWindowWidth);
|
||||
Height := AppSettings.ReadInt(asUsermanagerWindowHeight);
|
||||
pnlLeft.Width := AppSettings.ReadInt(asUsermanagerListWidth);
|
||||
FixVT(listUsers);
|
||||
FixVT(treePrivs);
|
||||
RestoreListSetup(listUsers);
|
||||
lblWarning.Font.Color := clRed;
|
||||
PrivsRead := Explode(',', 'SELECT,SHOW VIEW,SHOW DATABASES,PROCESS,EXECUTE');
|
||||
PrivsWrite := Explode(',', 'ALTER,CREATE,DROP,DELETE,UPDATE,INSERT,ALTER ROUTINE,CREATE ROUTINE,CREATE TEMPORARY TABLES,'+
|
||||
@ -290,6 +287,9 @@ var
|
||||
end;
|
||||
|
||||
begin
|
||||
FixVT(listUsers);
|
||||
FixVT(treePrivs);
|
||||
RestoreListSetup(listUsers);
|
||||
FColorReadPriv := clGreen;
|
||||
FColorWritePriv := clMaroon;
|
||||
FColorAdminPriv := clNavy;
|
||||
|
Reference in New Issue
Block a user