浏览代码

Finish updating Setup.WizardForm.

Jordan Russell 9 月之前
父节点
当前提交
c29c12eeb1
共有 2 个文件被更改,包括 8 次插入34 次删除
  1. 2 4
      Projects/Src/Setup.WizardForm.dfm
  2. 6 30
      Projects/Src/Setup.WizardForm.pas

+ 2 - 4
Projects/Src/Setup.WizardForm.dfm

@@ -1,8 +1,8 @@
 object WizardForm: TWizardForm
 object WizardForm: TWizardForm
   Left = 191
   Left = 191
   Top = 139
   Top = 139
-  BorderIcons = [biSystemMenu]
-  BorderStyle = bsDialog
+  BorderIcons = [biSystemMenu, biMinimize]
+  BorderStyle = bsSingle
   Caption = 'WizardForm'
   Caption = 'WizardForm'
   ClientHeight = 360
   ClientHeight = 360
   ClientWidth = 497
   ClientWidth = 497
@@ -12,14 +12,12 @@ object WizardForm: TWizardForm
   Font.Height = -11
   Font.Height = -11
   Font.Name = 'MS Sans Serif'
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Font.Style = []
-  OldCreateOrder = True
   Scaled = False
   Scaled = False
   OnClose = FormClose
   OnClose = FormClose
   OnResize = FormResize
   OnResize = FormResize
   DesignSize = (
   DesignSize = (
     497
     497
     360)
     360)
-  PixelsPerInch = 96
   TextHeight = 13
   TextHeight = 13
   object FBevel: TBevel
   object FBevel: TBevel
     Left = 0
     Left = 0

+ 6 - 30
Projects/Src/Setup.WizardForm.pas

@@ -759,10 +759,9 @@ var
   SystemMenu: HMENU;
   SystemMenu: HMENU;
   P: String;
   P: String;
   I, DefaultSetupTypeIndex: Integer;
   I, DefaultSetupTypeIndex: Integer;
-  DfmDefault, IgnoreInitComponents: Boolean;
+  IgnoreInitComponents: Boolean;
   TypeEntry: PSetupTypeEntry;
   TypeEntry: PSetupTypeEntry;
   ComponentEntry: PSetupComponentEntry;
   ComponentEntry: PSetupComponentEntry;
-  SaveClientWidth, SaveClientHeight: Integer;
 begin
 begin
   inherited;
   inherited;
 
 
@@ -791,34 +790,17 @@ begin
   WelcomeLabel1.Font.Style := [fsBold];
   WelcomeLabel1.Font.Style := [fsBold];
   PageNameLabel.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)
     Caption := FmtSetupMessage1(msgSetupWindowTitle, ExpandedAppVerName)
   else
   else
     Caption := FmtSetupMessage1(msgSetupWindowTitle, ExpandedAppName);
     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;
     ClientWidth := SaveClientWidth;
     ClientHeight := SaveClientHeight;
     ClientHeight := SaveClientHeight;
-  end;
-
-  if shWizardResizable in SetupHeader.Options then begin
     EnableAnchorOuterPagesOnResize := True;
     EnableAnchorOuterPagesOnResize := True;
     { Do not allow user to resize it smaller than 100% nor larger than 150%. }
     { Do not allow user to resize it smaller than 100% nor larger than 150%. }
     Constraints.MinHeight := Height;
     Constraints.MinHeight := Height;
@@ -2695,12 +2677,6 @@ end;
 
 
 procedure TWizardForm.WMSysCommand(var Message: TWMSysCommand);
 procedure TWizardForm.WMSysCommand(var Message: TWMSysCommand);
 begin
 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
   if Message.CmdType = 9999 then
     MainForm.ShowAboutBox
     MainForm.ShowAboutBox
   else
   else