浏览代码

Add TWizardPage.SurfaceColor and make TInputOptionWizardPage.Initialize use it.

Martijn Laan 6 年之前
父节点
当前提交
8a336454ae
共有 5 个文件被更改,包括 17 次插入3 次删除
  1. 1 0
      ISHelp/isxclasses.pas
  2. 1 0
      Projects/ScriptClasses_C.pas
  3. 1 1
      Projects/ScriptDlg.pas
  4. 7 0
      Projects/Wizard.pas
  5. 7 2
      whatsnew.htm

+ 1 - 0
ISHelp/isxclasses.pas

@@ -653,6 +653,7 @@ TWizardPage = class(TComponent)
   property Caption: String; read write;
   property Caption: String; read write;
   property Description: String; read write;
   property Description: String; read write;
   property Surface: TNewNotebookPage; read;
   property Surface: TNewNotebookPage; read;
+  property SurfaceColor: TColor; read;
   property SurfaceHeight: Integer; read;
   property SurfaceHeight: Integer; read;
   property SurfaceWidth: Integer; read;
   property SurfaceWidth: Integer; read;
   property OnActivate: TWizardPageNotifyEvent; read write;
   property OnActivate: TWizardPageNotifyEvent; read write;

+ 1 - 0
Projects/ScriptClasses_C.pas

@@ -441,6 +441,7 @@ begin
     RegisterProperty('Caption', 'String', iptrw);
     RegisterProperty('Caption', 'String', iptrw);
     RegisterProperty('Description', 'String', iptrw);
     RegisterProperty('Description', 'String', iptrw);
     RegisterProperty('Surface', 'TNewNotebookPage', iptr);
     RegisterProperty('Surface', 'TNewNotebookPage', iptr);
+    RegisterProperty('SurfaceColor', 'TColor', iptr);
     RegisterProperty('SurfaceHeight', 'Integer', iptr);
     RegisterProperty('SurfaceHeight', 'Integer', iptr);
     RegisterProperty('SurfaceWidth', 'Integer', iptr);
     RegisterProperty('SurfaceWidth', 'Integer', iptr);
     RegisterProperty('OnActivate', 'TWizardPageNotifyEvent', iptrw);
     RegisterProperty('OnActivate', 'TWizardPageNotifyEvent', iptrw);

+ 1 - 1
Projects/ScriptDlg.pas

@@ -302,7 +302,7 @@ begin
   FExclusive := Exclusive;
   FExclusive := Exclusive;
   if not ListBox then begin
   if not ListBox then begin
     FCheckListBox.BorderStyle := bsNone;
     FCheckListBox.BorderStyle := bsNone;
-    FCheckListBox.Color := clBtnFace;
+    FCheckListBox.Color := SurfaceColor;
     FCheckListBox.MinItemHeight := WizardForm.ScalePixelsY(22);
     FCheckListBox.MinItemHeight := WizardForm.ScalePixelsY(22);
     FCheckListBox.WantTabs := True;
     FCheckListBox.WantTabs := True;
   end;
   end;

+ 7 - 0
Projects/Wizard.pas

@@ -45,6 +45,7 @@ type
     FStyle: TWizardPageStyle;
     FStyle: TWizardPageStyle;
     FWizardForm: TWizardForm;
     FWizardForm: TWizardForm;
     function GetSurface: TNewNotebookPage;
     function GetSurface: TNewNotebookPage;
+    function GetSurfaceColor: TColor;
     function GetSurfaceHeight: Integer;
     function GetSurfaceHeight: Integer;
     function GetSurfaceWidth: Integer;
     function GetSurfaceWidth: Integer;
     procedure SetCaption(const Value: String);
     procedure SetCaption(const Value: String);
@@ -66,6 +67,7 @@ type
     property Description: String read FDescription write SetDescription;
     property Description: String read FDescription write SetDescription;
     property ID: Integer read FID;
     property ID: Integer read FID;
     property Surface: TNewNotebookPage read GetSurface;
     property Surface: TNewNotebookPage read GetSurface;
+    property SurfaceColor: TColor read GetSurfaceColor;
     property SurfaceHeight: Integer read GetSurfaceHeight;
     property SurfaceHeight: Integer read GetSurfaceHeight;
     property SurfaceWidth: Integer read GetSurfaceWidth;
     property SurfaceWidth: Integer read GetSurfaceWidth;
     property OnActivate: TWizardPageNotifyEvent read FOnActivate write FOnActivate;
     property OnActivate: TWizardPageNotifyEvent read FOnActivate write FOnActivate;
@@ -565,6 +567,11 @@ begin
     Result := FOuterNotebookPage;
     Result := FOuterNotebookPage;
 end;
 end;
 
 
+function TWizardPage.GetSurfaceColor: TColor;
+begin
+  Result := TNewNotebook(Surface.Parent).Color;
+end;
+
 function TWizardPage.GetSurfaceHeight: Integer;
 function TWizardPage.GetSurfaceHeight: Integer;
 begin
 begin
   Result := Surface.Parent.Height;
   Result := Surface.Parent.Height;

+ 7 - 2
whatsnew.htm

@@ -74,14 +74,19 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>Two separate installation runs that do not share the same administrative or non administrative install mode no longer count as the <a href="http://www.jrsoftware.org/is6help/index.php?topic=sameappnotes">same application</a>. This means you can now install these modes <a href="http://www.jrsoftware.org/is6help/index.php?topic=sidebyside">side-by-side</a> even if the installers share the same <tt>AppId</tt> setting (or if <tt>AppId</tt> is not set, the same <tt>AppName</tt> setting.)</li>
   <li>Two separate installation runs that do not share the same administrative or non administrative install mode no longer count as the <a href="http://www.jrsoftware.org/is6help/index.php?topic=sameappnotes">same application</a>. This means you can now install these modes <a href="http://www.jrsoftware.org/is6help/index.php?topic=sidebyside">side-by-side</a> even if the installers share the same <tt>AppId</tt> setting (or if <tt>AppId</tt> is not set, the same <tt>AppName</tt> setting.)</li>
   <li><b>Change in default behavior:</b> To avoid entries with identical names in the <i>Add/Remove Programs</i> Control Panel applet Setup will now automatically mark the new entry with a text like &quot;Current user&quot; or &quot;64-bit&quot; when necessary during a <a href="http://www.jrsoftware.org/is6help/index.php?topic=sidebyside">side-by-side</a> installation.</a>
   <li><b>Change in default behavior:</b> To avoid entries with identical names in the <i>Add/Remove Programs</i> Control Panel applet Setup will now automatically mark the new entry with a text like &quot;Current user&quot; or &quot;64-bit&quot; when necessary during a <a href="http://www.jrsoftware.org/is6help/index.php?topic=sidebyside">side-by-side</a> installation.</a>
 </ul>
 </ul>
-<p><span class="head2">Resizable wizard window and new modern wizard style</span></p>
-<p>The wizard window is now optionally resizable and supports a more modern look:</p>
+<p><span class="head2">Resizable wizard window</span></p>
+<p>The wizard window is now optionally resizable:</p>
 <ul>
 <ul>
   <li>Added new [Setup] section directive: <tt>WizardResizable</tt>. If this directive is set to <tt>yes</tt>, the user will be able to resize and maximize the wizard window.</li>
   <li>Added new [Setup] section directive: <tt>WizardResizable</tt>. If this directive is set to <tt>yes</tt>, the user will be able to resize and maximize the wizard window.</li>
   <li>Added new [Setup] section directive: <tt>WizardSizePercent</tt>, which can be used to increase the default size of the wizard window without increasing the font size.</li>
   <li>Added new [Setup] section directive: <tt>WizardSizePercent</tt>, which can be used to increase the default size of the wizard window without increasing the font size.</li>
   <li>Pascal Scripting change: Added new <tt>Anchors</tt> property to all controls which allows you to add full support for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> to all your custom controls and wizard pages if you have any. See the <i>CodeClasses.iss</i> example script for an example.</li>
   <li>Pascal Scripting change: Added new <tt>Anchors</tt> property to all controls which allows you to add full support for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> to all your custom controls and wizard pages if you have any. See the <i>CodeClasses.iss</i> example script for an example.</li>
+</ul>
+<p><span class="head2">New modern wizard style</span></p>
+<p>The wizard window now supports a more modern look:</p>
+<ul>
   <li>Added new [Setup] section directive: <tt>WizardStyle</tt>. If this directive is set to <tt>modern</tt>, Setup will show a more modern look and also the defaults for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> change to respectively <tt>yes</tt> and <tt>120,120</tt>.</li>
   <li>Added new [Setup] section directive: <tt>WizardStyle</tt>. If this directive is set to <tt>modern</tt>, Setup will show a more modern look and also the defaults for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> change to respectively <tt>yes</tt> and <tt>120,120</tt>.</li>
   <li><b>Change in default behavior:</b> Earlier versions of Inno Setup also supported <tt>WizardStyle</tt> and if you still have <tt>WizardStyle=modern</tt> in your script (which was allowed for backward compatibility but didn't actually change anything) and don't want to new modern look, you should remove this line or change it to <tt>WizardStyle=classic</tt>.</li>
   <li><b>Change in default behavior:</b> Earlier versions of Inno Setup also supported <tt>WizardStyle</tt> and if you still have <tt>WizardStyle=modern</tt> in your script (which was allowed for backward compatibility but didn't actually change anything) and don't want to new modern look, you should remove this line or change it to <tt>WizardStyle=classic</tt>.</li>
+  <li>Pascal Scripting change: Added new <tt>SurfaceColor</tt> property to the <tt>TWizardPage</tt> support class.</li>
 </ul>
 </ul>
 <p><span class="head2">Other changes</span></p>
 <p><span class="head2">Other changes</span></p>
 <ul>
 <ul>