Parcourir la source

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 il y a 6 ans
Parent
commit
b9089eadd8
3 fichiers modifiés avec 60 ajouts et 30 suppressions
  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]
   BorderStyle = bsDialog
   Caption = 'SelectLanguageForm'
-  ClientHeight = 125
+  ClientHeight = 132
   ClientWidth = 297
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
@@ -16,57 +16,78 @@ object SelectLanguageForm: TSelectLanguageForm
   Scaled = False
   DesignSize = (
     297
-    125)
+    132)
   PixelsPerInch = 96
   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
   object CancelButton: TNewButton
     Left = 214
-    Top = 93
+    Top = 100
     Width = 75
     Height = 23
     Anchors = [akRight, akBottom]
     Cancel = True
     Caption = '*'
     ModalResult = 2
-    TabOrder = 3
+    TabOrder = 2
   end
   object OKButton: TNewButton
     Left = 133
-    Top = 93
+    Top = 100
     Width = 75
     Height = 23
     Anchors = [akRight, akBottom]
     Caption = '*'
     Default = True
     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
   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]
-    AutoSize = False
-    Caption = '*'
+    BevelOuter = bvNone
+    Color = clWindow
     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

+ 9 - 1
Projects/SelLangForm.pas

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