]> granicus.if.org Git - handbrake/commitdiff
WinGui: Make the Dark Theme Windows 10 only.
authorsr55 <sr55.hb@outlook.com>
Sat, 3 Aug 2019 19:20:46 +0000 (20:20 +0100)
committersr55 <sr55.hb@outlook.com>
Mon, 12 Aug 2019 17:41:56 +0000 (18:41 +0100)
win/CS/HandBrakeWPF/App.xaml.cs
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/Views/OptionsView.xaml

index 320318cbcc99d9c769969d88b84bf5cd42f55184..d9f76ef5452117b8d9d9b8abd32f9a01b517064e 100644 (file)
@@ -122,7 +122,7 @@ namespace HandBrakeWPF
             }\r
 \r
             bool useDarkTheme = userSettingService.GetUserSetting<bool>(UserSettingConstants.UseDarkTheme);\r
-            if (useDarkTheme)\r
+            if (useDarkTheme && SystemInfo.IsWindows10())\r
             {\r
                 ResourceDictionary darkTheme = new ResourceDictionary();\r
                 darkTheme.Source = new Uri("Themes/Dark.xaml", UriKind.Relative);\r
index 14b910d65424a2814f32983e929c9289b1653e2b..5845401359f5e19b117e66574b021f2e6f33d72a 100644 (file)
@@ -2633,7 +2633,7 @@ namespace HandBrakeWPF.Properties {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Use the Dark Theme. (Requires Restart)  (THIS IS AN EARLY PREVIEW. IT IS NOT YET COMPLETE!).
+        ///   Looks up a localized string similar to Use the Dark Theme. (Requires Restart, Windows 10 only).
         /// </summary>
         public static string Options_DarkTheme {
             get {
index ef35df77cf0dba13a6d1a2527239f6c32bd559a0..e40d9f7c95995a8d6dff93d38e0bd42e3b20f1aa 100644 (file)
@@ -1992,7 +1992,7 @@ Where supported, any user presets will have been imported.</value>
     <value>Export Queue (CLI Only)</value>\r
   </data>\r
   <data name="Options_DarkTheme" xml:space="preserve">\r
-    <value>Use the Dark Theme. (Requires Restart)  (THIS IS AN EARLY PREVIEW. IT IS NOT YET COMPLETE!)</value>\r
+    <value>Use the Dark Theme. (Requires Restart, Windows 10 only)</value>\r
   </data>\r
   <data name="QueueView_NotAvailable" xml:space="preserve">\r
     <value>Not Available</value>\r
index 4d44d192e3c181cb8420f57593db9a813b9d6e7f..df1acb451fda3dbc5ccf91cc53dae14006ee53bf 100644 (file)
@@ -190,6 +190,8 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        public bool IsWindows10 => HandBrakeWPF.Utilities.SystemInfo.IsWindows10();\r
+\r
         #region General\r
 \r
         public BindingList<InterfaceLanguage> InterfaceLanguages\r
index 3069acccb0a859438038e9acb1464d783c88d700..d203c27ee91e46279443267baae1772fac35fbe1 100644 (file)
                         </StackPanel>\r
 \r
                         <StackPanel Orientation="Vertical" Margin="20,5,0,0">\r
-                            <CheckBox Content="{x:Static Properties:Resources.Options_DarkTheme}" IsChecked="{Binding UseDarkTheme}" />\r
+                            <CheckBox Content="{x:Static Properties:Resources.Options_DarkTheme}" IsEnabled="{Binding IsWindows10}" IsChecked="{Binding UseDarkTheme}" />\r
                             <CheckBox Content="{x:Static Properties:Resources.Options_MinimiseTray}" IsChecked="{Binding MinimiseToTray}" />\r
                             <CheckBox Content="{x:Static Properties:Resources.Options_ClearCompleted}" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />\r
                             <CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />\r