summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-08-03 20:20:46 +0100
committersr55 <[email protected]>2019-08-12 18:41:56 +0100
commit482edae69956ca854a9fa72f5c31aef9492a61f5 (patch)
tree51e2376851e919414745c489d975a6d2bf618ed5 /win
parent8d44138c667004478818749914355cd794cbb561 (diff)
WinGui: Make the Dark Theme Windows 10 only.
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/App.xaml.cs2
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs2
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml2
5 files changed, 6 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs
index 320318cbc..d9f76ef54 100644
--- a/win/CS/HandBrakeWPF/App.xaml.cs
+++ b/win/CS/HandBrakeWPF/App.xaml.cs
@@ -122,7 +122,7 @@ namespace HandBrakeWPF
}
bool useDarkTheme = userSettingService.GetUserSetting<bool>(UserSettingConstants.UseDarkTheme);
- if (useDarkTheme)
+ if (useDarkTheme && SystemInfo.IsWindows10())
{
ResourceDictionary darkTheme = new ResourceDictionary();
darkTheme.Source = new Uri("Themes/Dark.xaml", UriKind.Relative);
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index 14b910d65..584540135 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -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 {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index ef35df77c..e40d9f7c9 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -1992,7 +1992,7 @@ Where supported, any user presets will have been imported.</value>
<value>Export Queue (CLI Only)</value>
</data>
<data name="Options_DarkTheme" xml:space="preserve">
- <value>Use the Dark Theme. (Requires Restart) (THIS IS AN EARLY PREVIEW. IT IS NOT YET COMPLETE!)</value>
+ <value>Use the Dark Theme. (Requires Restart, Windows 10 only)</value>
</data>
<data name="QueueView_NotAvailable" xml:space="preserve">
<value>Not Available</value>
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 4d44d192e..df1acb451 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -190,6 +190,8 @@ namespace HandBrakeWPF.ViewModels
}
}
+ public bool IsWindows10 => HandBrakeWPF.Utilities.SystemInfo.IsWindows10();
+
#region General
public BindingList<InterfaceLanguage> InterfaceLanguages
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 3069acccb..d203c27ee 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -116,7 +116,7 @@
</StackPanel>
<StackPanel Orientation="Vertical" Margin="20,5,0,0">
- <CheckBox Content="{x:Static Properties:Resources.Options_DarkTheme}" IsChecked="{Binding UseDarkTheme}" />
+ <CheckBox Content="{x:Static Properties:Resources.Options_DarkTheme}" IsEnabled="{Binding IsWindows10}" IsChecked="{Binding UseDarkTheme}" />
<CheckBox Content="{x:Static Properties:Resources.Options_MinimiseTray}" IsChecked="{Binding MinimiseToTray}" />
<CheckBox Content="{x:Static Properties:Resources.Options_ClearCompleted}" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />
<CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />