瀏覽代碼

Add WizardResizable, default to no. Will doc later.

Martijn Laan 6 年之前
父節點
當前提交
78fa35248a
共有 5 個文件被更改,包括 25 次插入7 次删除
  1. 1 0
      Components/ScintStylerInnoSetup.pas
  2. 4 0
      Projects/Compile.pas
  3. 2 1
      Projects/Struct.pas
  4. 2 1
      Projects/Wizard.dfm
  5. 16 5
      Projects/Wizard.pas

+ 1 - 0
Components/ScintStylerInnoSetup.pas

@@ -258,6 +258,7 @@ type
     ssWizardImageBackColor,
     ssWizardImageFile,
     ssWizardImageStretch,
+    ssWizardResizable,
     ssWizardSmallImageBackColor,
     ssWizardSmallImageFile,
     ssWizardStyle);

+ 4 - 0
Projects/Compile.pas

@@ -205,6 +205,7 @@ type
     ssWizardImageBackColor,
     ssWizardImageFile,
     ssWizardImageStretch,
+    ssWizardResizable,
     ssWizardSmallImageBackColor,
     ssWizardSmallImageFile,
     ssWizardStyle);
@@ -4423,6 +4424,9 @@ begin
           Invalid;
         WizardImageFile := Value;
       end;
+    ssWizardResizable: begin
+        SetSetupHeaderOption(shWizardResizable);
+      end;
     ssWizardSmallImageFile: begin
         if Value = '' then
           Invalid;

+ 2 - 1
Projects/Struct.pas

@@ -65,7 +65,8 @@ type
     {$IFNDEF UNICODE}shShowUndisplayableLanguages, {$ENDIF}shSetupLogging,
     shSignedUninstaller, shUsePreviousLanguage, shDisableWelcomePage,
     shCloseApplications, shRestartApplications, shAllowNetworkDrive,
-    shForceCloseApplications, shAppNameHasConsts, shUsePreviousPrivileges);
+    shForceCloseApplications, shAppNameHasConsts, shUsePreviousPrivileges,
+    shWizardResizable);
   TSetupLanguageDetectionMethod = (ldUILanguage, ldLocale, ldNone);
   TSetupCompressMethod = (cmStored, cmZip, cmBzip, cmLZMA, cmLZMA2);
   TSetupSalt = array[0..7] of Byte;

+ 2 - 1
Projects/Wizard.dfm

@@ -1,7 +1,8 @@
 object WizardForm: TWizardForm
   Left = 191
   Top = 139
-  BorderIcons = [biSystemMenu, biMaximize]
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsDialog
   Caption = 'WizardForm'
   ClientHeight = 360
   ClientWidth = 497

+ 16 - 5
Projects/Wizard.pas

@@ -739,14 +739,25 @@ begin
   else
     Caption := FmtSetupMessage1(msgSetupWindowTitle, ExpandedAppName);
 
-  { Give it a minimize button if main window isn't visible }
-  if not(shWindowVisible in SetupHeader.Options) then begin
+  { Set BorderStyle and BorderIcons:
+    -WindowVisible + WizardResizable = sizeable + maximize
+    -not WindowVisible + WizardResizable = sizeable + maximize + minimize
+    -WindowVisible + not WizardResizable = dialog (.dfm default)
+    -not WindowVisible + not WizardResizable = single + minimize }
+  if not(shWindowVisible in SetupHeader.Options) or
+     (shWizardResizable in SetupHeader.Options) then begin
     { Save ClientWidth/ClientHeight and restore them after changing
-      BorderStyle. Needed for NT 3.x. }
+      BorderStyle. }
     SaveClientWidth := ClientWidth;
     SaveClientHeight := ClientHeight;
-    BorderIcons := BorderIcons + [biMinimize];
-    BorderStyle := bsSizeable;
+    if not(shWindowVisible in SetupHeader.Options) then
+      BorderIcons := BorderIcons + [biMinimize];
+    if not(shWizardResizable in SetupHeader.Options) then
+      BorderStyle := bsSingle
+    else begin
+      BorderIcons := BorderIcons + [biMaximize];
+      BorderStyle := bsSizeable;
+    end;
     ClientWidth := SaveClientWidth;
     ClientHeight := SaveClientHeight;
   end;