ソースを参照

The Select Language dialog now has more modern look, consistent with Windows 10 task dialogs and message boxes. Also more consistent with the wizard itself.

Might do the other dialogs as well later.
Martijn Laan 6 年 前
コミット
b9089eadd8
3 ファイル変更60 行追加30 行削除
  1. 50 29
      Projects/SelLangForm.dfm
  2. 9 1
      Projects/SelLangForm.pas
  3. 1 0
      whatsnew.htm

+ 50 - 29
Projects/SelLangForm.dfm

@@ -4,7 +4,7 @@ object SelectLanguageForm: TSelectLanguageForm
   BorderIcons = [biSystemMenu]
   BorderIcons = [biSystemMenu]
   BorderStyle = bsDialog
   BorderStyle = bsDialog
   Caption = 'SelectLanguageForm'
   Caption = 'SelectLanguageForm'
-  ClientHeight = 125
+  ClientHeight = 132
   ClientWidth = 297
   ClientWidth = 297
   Color = clBtnFace
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Charset = DEFAULT_CHARSET
@@ -16,57 +16,78 @@ object SelectLanguageForm: TSelectLanguageForm
   Scaled = False
   Scaled = False
   DesignSize = (
   DesignSize = (
     297
     297
-    125)
+    132)
   PixelsPerInch = 96
   PixelsPerInch = 96
   TextHeight = 13
   TextHeight = 13
-  object IconBitmapImage: TBitmapImage
-    Left = 8
-    Top = 8
-    Width = 32
-    Height = 32
+  object Bevel: TBevel
+    Left = 0
+    Top = 89
+    Width = 297
+    Height = 1
+    Anchors = [akLeft, akRight, akBottom]
+    Shape = bsTopLine
   end
   end
   object CancelButton: TNewButton
   object CancelButton: TNewButton
     Left = 214
     Left = 214
-    Top = 93
+    Top = 100
     Width = 75
     Width = 75
     Height = 23
     Height = 23
     Anchors = [akRight, akBottom]
     Anchors = [akRight, akBottom]
     Cancel = True
     Cancel = True
     Caption = '*'
     Caption = '*'
     ModalResult = 2
     ModalResult = 2
-    TabOrder = 3
+    TabOrder = 2
   end
   end
   object OKButton: TNewButton
   object OKButton: TNewButton
     Left = 133
     Left = 133
-    Top = 93
+    Top = 100
     Width = 75
     Width = 75
     Height = 23
     Height = 23
     Anchors = [akRight, akBottom]
     Anchors = [akRight, akBottom]
     Caption = '*'
     Caption = '*'
     Default = True
     Default = True
     ModalResult = 1
     ModalResult = 1
-    TabOrder = 2
-  end
-  object LangCombo: TNewComboBox
-    Left = 56
-    Top = 56
-    Width = 233
-    Height = 21
-    Style = csDropDownList
-    Anchors = [akLeft, akTop, akRight]
-    DropDownCount = 16
-    Sorted = True
     TabOrder = 1
     TabOrder = 1
   end
   end
-  object SelectLabel: TNewStaticText
-    Left = 56
-    Top = 8
-    Width = 233
-    Height = 39
+  object MainPanel: TPanel
+    Left = 0
+    Top = 0
+    Width = 297
+    Height = 89
     Anchors = [akLeft, akTop, akRight]
     Anchors = [akLeft, akTop, akRight]
-    AutoSize = False
-    Caption = '*'
+    BevelOuter = bvNone
+    Color = clWindow
     TabOrder = 0
     TabOrder = 0
-    WordWrap = True
+    DesignSize = (
+      297
+      89)
+    object IconBitmapImage: TBitmapImage
+      Left = 8
+      Top = 8
+      Width = 32
+      Height = 32
+    end
+    object LangCombo: TNewComboBox
+      Left = 56
+      Top = 56
+      Width = 233
+      Height = 21
+      Style = csDropDownList
+      Anchors = [akLeft, akTop, akRight]
+      DropDownCount = 16
+      Sorted = True
+      TabOrder = 1
+    end
+    object SelectLabel: TNewStaticText
+      Left = 56
+      Top = 8
+      Width = 233
+      Height = 39
+      Anchors = [akLeft, akTop, akRight]
+      AutoSize = False
+      Caption = '*'
+      TabOrder = 0
+      WordWrap = True
+    end
   end
   end
 end
 end

+ 9 - 1
Projects/SelLangForm.pas

@@ -11,6 +11,8 @@ unit SelLangForm;
 
 
 interface
 interface
 
 
+{$I VERSION.INC}
+
 uses
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   SetupForm, StdCtrls, ExtCtrls, NewStaticText, BitmapImage, BidiCtrls;
   SetupForm, StdCtrls, ExtCtrls, NewStaticText, BitmapImage, BidiCtrls;
@@ -22,6 +24,8 @@ type
     OKButton: TNewButton;
     OKButton: TNewButton;
     CancelButton: TNewButton;
     CancelButton: TNewButton;
     IconBitmapImage: TBitmapImage;
     IconBitmapImage: TBitmapImage;
+    MainPanel: TPanel;
+    Bevel: TBevel;
   private
   private
     { Private declarations }
     { Private declarations }
   public
   public
@@ -155,6 +159,10 @@ constructor TSelectLanguageForm.Create(AOwner: TComponent);
 begin
 begin
   inherited;
   inherited;
 
 
+{$IFDEF IS_D7}
+  MainPanel.ParentBackground := False;
+{$ENDIF}
+
   InitializeFont;
   InitializeFont;
 
 
   Caption := SetupMessages[msgSelectLanguageTitle];
   Caption := SetupMessages[msgSelectLanguageTitle];
@@ -162,7 +170,7 @@ begin
   OKButton.Caption := SetupMessages[msgButtonOK];
   OKButton.Caption := SetupMessages[msgButtonOK];
   CancelButton.Caption := SetupMessages[msgButtonCancel];
   CancelButton.Caption := SetupMessages[msgButtonCancel];
 
 
-  IconBitmapImage.Bitmap.Canvas.Brush.Color := Color;
+  IconBitmapImage.Bitmap.Canvas.Brush.Color := MainPanel.Color;
   IconBitmapImage.Bitmap.Width := Application.Icon.Width;
   IconBitmapImage.Bitmap.Width := Application.Icon.Width;
   IconBitmapImage.Bitmap.Height := Application.Icon.Height;
   IconBitmapImage.Bitmap.Height := Application.Icon.Height;
   IconBitmapImage.Bitmap.Canvas.Draw(0, 0, Application.Icon);
   IconBitmapImage.Bitmap.Canvas.Draw(0, 0, Application.Icon);

+ 1 - 0
whatsnew.htm

@@ -101,6 +101,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>The compiler will now throw an error if the $f sequence is missing in a Sign Tool command instead of executing it anyway.</li>
   <li>The compiler will now throw an error if the $f sequence is missing in a Sign Tool command instead of executing it anyway.</li>
   <li>Fix: The compiler now checks <tt>OutputBaseFileName</tt> and <tt>OutputManifestFile</tt> for bad characters even if <tt>Output</tt> is set to <tt>no</tt>.</li>
   <li>Fix: The compiler now checks <tt>OutputBaseFileName</tt> and <tt>OutputManifestFile</tt> for bad characters even if <tt>Output</tt> is set to <tt>no</tt>.</li>
   <li>Flattened a few elements of Setup's interface for a more modern look.</li>
   <li>Flattened a few elements of Setup's interface for a more modern look.</li>
+  <li>The <i>Select Language</i> dialog now has more modern look, consistent with Windows 10 task dialogs and message boxes (<a href="https://i.imgur.com/bC3BNHg.png">example</a>).</li>
 </ul>
 </ul>
 <ul>
 <ul>
   <li>Compiler IDE changes:
   <li>Compiler IDE changes: