From c29c12eeb19072c7e3d8cf786f66ecfa56c855d1 Mon Sep 17 00:00:00 2001 From: Jordan Russell Date: Sun, 15 Dec 2024 01:02:09 -0600 Subject: [PATCH] Finish updating Setup.WizardForm. --- Projects/Src/Setup.WizardForm.dfm | 6 ++---- Projects/Src/Setup.WizardForm.pas | 36 ++++++------------------------- 2 files changed, 8 insertions(+), 34 deletions(-) diff --git a/Projects/Src/Setup.WizardForm.dfm b/Projects/Src/Setup.WizardForm.dfm index b9b8a4acb..4cccae5ad 100644 --- a/Projects/Src/Setup.WizardForm.dfm +++ b/Projects/Src/Setup.WizardForm.dfm @@ -1,8 +1,8 @@ object WizardForm: TWizardForm Left = 191 Top = 139 - BorderIcons = [biSystemMenu] - BorderStyle = bsDialog + BorderIcons = [biSystemMenu, biMinimize] + BorderStyle = bsSingle Caption = 'WizardForm' ClientHeight = 360 ClientWidth = 497 @@ -12,14 +12,12 @@ object WizardForm: TWizardForm Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] - OldCreateOrder = True Scaled = False OnClose = FormClose OnResize = FormResize DesignSize = ( 497 360) - PixelsPerInch = 96 TextHeight = 13 object FBevel: TBevel Left = 0 diff --git a/Projects/Src/Setup.WizardForm.pas b/Projects/Src/Setup.WizardForm.pas index bb74a3a75..f713bf346 100644 --- a/Projects/Src/Setup.WizardForm.pas +++ b/Projects/Src/Setup.WizardForm.pas @@ -759,10 +759,9 @@ constructor TWizardForm.Create(AOwner: TComponent); SystemMenu: HMENU; P: String; I, DefaultSetupTypeIndex: Integer; - DfmDefault, IgnoreInitComponents: Boolean; + IgnoreInitComponents: Boolean; TypeEntry: PSetupTypeEntry; ComponentEntry: PSetupComponentEntry; - SaveClientWidth, SaveClientHeight: Integer; begin inherited; @@ -791,34 +790,17 @@ constructor TWizardForm.Create(AOwner: TComponent); WelcomeLabel1.Font.Style := [fsBold]; PageNameLabel.Font.Style := [fsBold]; - if shWindowVisible in SetupHeader.Options then - Caption := SetupMessages[msgSetupAppTitle] - else if shDisableWelcomePage in SetupHeader.Options then + if shDisableWelcomePage in SetupHeader.Options then Caption := FmtSetupMessage1(msgSetupWindowTitle, ExpandedAppVerName) else Caption := FmtSetupMessage1(msgSetupWindowTitle, ExpandedAppName); - { Set BorderStyle and BorderIcons: - -WindowVisible + WizardResizable = sizeable - -not WindowVisible + WizardResizable = sizeable + minimize - -WindowVisible + not WizardResizable = dialog = .dfm default = do nothing - -not WindowVisible + not WizardResizable = single + minimize } - DfmDefault := (shWindowVisible in SetupHeader.Options) and not (shWizardResizable in SetupHeader.Options); - if not DfmDefault then begin - { Save ClientWidth/ClientHeight and restore them after changing BorderStyle. } - SaveClientWidth := ClientWidth; - SaveClientHeight := ClientHeight; - if not(shWindowVisible in SetupHeader.Options) then - BorderIcons := BorderIcons + [biMinimize]; - if not(shWizardResizable in SetupHeader.Options) then - BorderStyle := bsSingle - else - BorderStyle := bsSizeable; + if shWizardResizable in SetupHeader.Options then begin + const SaveClientWidth = ClientWidth; + const SaveClientHeight = ClientHeight; + BorderStyle := bsSizeable; ClientWidth := SaveClientWidth; ClientHeight := SaveClientHeight; - end; - - if shWizardResizable in SetupHeader.Options then begin EnableAnchorOuterPagesOnResize := True; { Do not allow user to resize it smaller than 100% nor larger than 150%. } Constraints.MinHeight := Height; @@ -2695,12 +2677,6 @@ procedure TWizardForm.NoIconsCheckClick(Sender: TObject); procedure TWizardForm.WMSysCommand(var Message: TWMSysCommand); begin - if Message.CmdType and $FFF0 = SC_MINIMIZE then - { A minimize button is shown on the wizard form when (shWindowVisible in - SetupHeader.Options). When it is clicked we want to minimize the whole - application. } - Application.Minimize - else if Message.CmdType = 9999 then MainForm.ShowAboutBox else