summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
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/ViewModels
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/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs24
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs12
3 files changed, 37 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index dc9f6806b..e1376363a 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -358,6 +358,11 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
private bool removePunctuation;
+ /// <summary>
+ /// The use system colours for styles.
+ /// </summary>
+ private bool useSystemColoursForStyles;
+
#endregion
#region Constructors and Destructors
@@ -604,6 +609,23 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange("WhenDoneOptions");
}
}
+
+ /// <summary>
+ /// Gets or sets a value indicating whether use system colours.
+ /// </summary>
+ public bool UseSystemColoursForStylesForStyles
+ {
+ get
+ {
+ return this.useSystemColoursForStyles;
+ }
+ set
+ {
+ this.useSystemColoursForStyles = value;
+ this.NotifyOfPropertyChange(() => UseSystemColoursForStylesForStyles);
+ }
+ }
+
#endregion
#region Output Files
@@ -1514,6 +1536,7 @@ namespace HandBrakeWPF.ViewModels
this.SendFileTo = Path.GetFileNameWithoutExtension(this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileTo)) ?? string.Empty;
this.SendFileToPath = this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileTo) ?? string.Empty;
this.Arguments = this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileToArgs) ?? string.Empty;
+ this.UseSystemColoursForStylesForStyles = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UseSystemColours);
// #############################
// Output Settings
@@ -1850,6 +1873,7 @@ namespace HandBrakeWPF.ViewModels
this.userSettingService.SetUserSetting(UserSettingConstants.SendFileTo, this.SendFileToPath);
this.userSettingService.SetUserSetting(UserSettingConstants.SendFile, this.SendFileAfterEncode);
this.userSettingService.SetUserSetting(UserSettingConstants.SendFileToArgs, this.Arguments);
+ this.userSettingService.SetUserSetting(UserSettingConstants.UseSystemColours, this.UseSystemColoursForStylesForStyles);
/* Output Files */
this.userSettingService.SetUserSetting(UserSettingConstants.AutoNaming, this.AutomaticallyNameFiles);
diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
index a64378a49..39fee77fd 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
@@ -15,6 +15,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Helpers;
using HandBrakeWPF.Model;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
index f1766741e..7a13881dc 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
@@ -13,6 +13,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Helpers;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -65,6 +66,17 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// Gets a value indicating whether use system colours.
+ /// </summary>
+ public bool UseSystemColours
+ {
+ get
+ {
+ return AppStyleHelper.UseSystemColours;
+ }
+ }
+
+ /// <summary>
/// Gets or sets WindowManager.
/// </summary>
public IWindowManager WindowManager { get; set; }