From 97769166a50e30941dfad0ad227a37c8538a72e1 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 13 Jun 2013 18:38:02 +0000 Subject: 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 --- win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs (limited to 'win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs') 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 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Defines the AppStyleHelper type. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Helpers +{ + using System.Windows; + + using Caliburn.Micro; + + using HandBrake.ApplicationServices.Services.Interfaces; + + /// + /// The AppStyle Helper. + /// + public class AppStyleHelper + { + /// + /// Gets a value indicating whether use system colours. + /// + public static bool UseSystemColours + { + get + { + IUserSettingService userSettingService = IoC.Get(); + bool useSystemColours = userSettingService.GetUserSetting(UserSettingConstants.UseSystemColours); + + return useSystemColours || SystemParameters.HighContrast; + } + } + } +} -- cgit v1.2.3