From 48bddbc3b6c8c88adceeff34bf5846535d26792f Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 23 Mar 2025 15:39:39 +0100 Subject: [PATCH] Issue #1482: move auto-arrangement of controls from OnCreate to OnShow, so the final height of a TEdit is considered (35px vs 28px on Ubuntu with 100% DPI) --- source/connections.pas | 11 ++++++----- source/extra_controls.pas | 1 + source/usermanager.pas | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/source/connections.pas b/source/connections.pas index 498905d8..edf8d764 100644 --- a/source/connections.pas +++ b/source/connections.pas @@ -286,11 +286,6 @@ var i: Integer; ExeFiles: TStringList; begin - ArrangeControls(tabSettings); - ArrangeControls(tabSSHtunnel); - ArrangeControls(tabAdvanced); - ArrangeControls(tabSSL); - ArrangeControls(tabStatistics); Width := AppSettings.ReadInt(asSessionManagerWindowWidth); Height := AppSettings.ReadInt(asSessionManagerWindowHeight); Left := AppSettings.ReadInt(asSessionManagerWindowLeft, '', Left); @@ -416,6 +411,12 @@ var PSess: PConnectionParameters; Node: PVirtualNode; begin + ArrangeControls(tabSettings); + ArrangeControls(tabSSHtunnel); + ArrangeControls(tabAdvanced); + ArrangeControls(tabSSL); + ArrangeControls(tabStatistics); + // Init sessions tree RefreshSessions(nil); diff --git a/source/extra_controls.pas b/source/extra_controls.pas index 397e5fab..a999205e 100644 --- a/source/extra_controls.pas +++ b/source/extra_controls.pas @@ -189,6 +189,7 @@ begin Inc(y, 1); end else begin + ControlRow.Height := aParentControl.ScaleDesignToForm(ControlRow.Height); Add(ControlRow); Inc(y, yCoordStep); end; diff --git a/source/usermanager.pas b/source/usermanager.pas index 93beeac9..2d65a978 100644 --- a/source/usermanager.pas +++ b/source/usermanager.pas @@ -278,6 +278,9 @@ var end; begin + ArrangeControls(tabCredentials); + ArrangeControls(tabLimitations); + ArrangeControls(tabSSL); Width := AppSettings.ReadIntDpiAware(asUsermanagerWindowWidth, Self); Height := AppSettings.ReadIntDpiAware(asUsermanagerWindowHeight, Self); pnlLeft.Width := AppSettings.ReadIntDpiAware(asUsermanagerListWidth, Self);