summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Helpers
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-06-13 18:38:02 +0000
committersr55 <[email protected]>2013-06-13 18:38:02 +0000
commit97769166a50e30941dfad0ad227a37c8538a72e1 (patch)
tree2b254084a2eca1ec5610060a57e7eae75cfd455f /win/CS/HandBrakeWPF/Helpers
parent8e8277e05d69226d96d75ba8667413559350c8c3 (diff)
WinGui: Added a new option that will allow users to fallback to using system colours. This is useful for those running non-standard system themes or high contrast mode.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5575 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs b/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
new file mode 100644
index 000000000..9b67f97e2
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
@@ -0,0 +1,37 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AppStyleHelper.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the AppStyleHelper type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Helpers
+{
+ using System.Windows;
+
+ using Caliburn.Micro;
+
+ using HandBrake.ApplicationServices.Services.Interfaces;
+
+ /// <summary>
+ /// The AppStyle Helper.
+ /// </summary>
+ public class AppStyleHelper
+ {
+ /// <summary>
+ /// Gets a value indicating whether use system colours.
+ /// </summary>
+ public static bool UseSystemColours
+ {
+ get
+ {
+ IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
+ bool useSystemColours = userSettingService.GetUserSetting<bool>(UserSettingConstants.UseSystemColours);
+
+ return useSystemColours || SystemParameters.HighContrast;
+ }
+ }
+ }
+}