summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs12
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs9
-rw-r--r--win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs118
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj2
-rw-r--r--win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs37
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs11
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx11
-rw-r--r--win/CS/HandBrakeWPF/UserSettingConstants.cs5
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs12
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs8
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs22
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs12
-rw-r--r--win/CS/HandBrakeWPF/Views/AddPresetView.xaml20
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml14
-rw-r--r--win/CS/HandBrakeWPF/Views/ErrorView.xaml21
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml10
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml23
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml18
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml1
-rw-r--r--win/CS/HandBrakeWPF/Views/Styles/Styles.xaml46
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesView.xaml16
-rw-r--r--win/CS/HandBrakeWPF/defaultsettings.xml9
22 files changed, 31 insertions, 406 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs
index aee941447..a84f5f657 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstanceManager.cs
@@ -17,7 +17,7 @@ namespace HandBrake.ApplicationServices.Interop
/// The HandBrake Instance manager.
/// Only supports scanning right now.
/// </summary>
- internal static class HandBrakeInstanceManager
+ public static class HandBrakeInstanceManager
{
private static HandBrakeInstance scanInstance;
private static HandBrakeInstance encodeInstance;
@@ -49,7 +49,7 @@ namespace HandBrake.ApplicationServices.Interop
/// <returns>
/// The <see cref="IHandBrakeInstance"/>.
/// </returns>
- public static IHandBrakeInstance GetScanInstance(int verbosity)
+ internal static IHandBrakeInstance GetScanInstance(int verbosity)
{
if (scanInstance != null)
{
@@ -73,7 +73,7 @@ namespace HandBrake.ApplicationServices.Interop
/// <returns>
/// The <see cref="IHandBrakeInstance"/>.
/// </returns>
- public static IHandBrakeInstance GetEncodeInstance(int verbosity)
+ internal static IHandBrakeInstance GetEncodeInstance(int verbosity)
{
if (encodeInstance != null)
{
@@ -91,7 +91,7 @@ namespace HandBrake.ApplicationServices.Interop
/// <summary>
/// Gets the master instance.
/// </summary>
- public static IHandBrakeInstance MasterInstance
+ internal static IHandBrakeInstance MasterInstance
{
get
{
@@ -102,7 +102,7 @@ namespace HandBrake.ApplicationServices.Interop
/// <summary>
/// Gets the last scan scan instance.
/// </summary>
- public static IHandBrakeInstance LastScanScanInstance
+ internal static IHandBrakeInstance LastScanScanInstance
{
get
{
@@ -124,7 +124,7 @@ namespace HandBrake.ApplicationServices.Interop
/// <summary>
/// Gets the last encode scan instance.
/// </summary>
- public static IHandBrakeInstance LastEncodeScanInstance
+ internal static IHandBrakeInstance LastEncodeScanInstance
{
get
{
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
index 0fdf95211..e2610905d 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
@@ -26,15 +26,8 @@ namespace HandBrake.ApplicationServices.Interop
public class HandBrakePresetService
{
/// <summary>
- /// Initializes static members of the <see cref="HandBrakePresetService"/> class.
- /// </summary>
- static HandBrakePresetService()
- {
- HandBrakeInstanceManager.Init();
- }
-
- /// <summary>
/// The get built in presets.
+ /// Requires an hb_init to have been invoked.
/// </summary>
/// <returns>
/// The <see cref="string"/>.
diff --git a/win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs b/win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs
deleted file mode 100644
index 4bf88f35a..000000000
--- a/win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs
+++ /dev/null
@@ -1,118 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="CancelScanCommand.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>
-// Command to cancel a scan that is in progress
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Commands
-{
- using System;
- using System.Windows.Input;
-
- using HandBrake.ApplicationServices.Services.Scan.EventArgs;
- using HandBrake.ApplicationServices.Services.Scan.Interfaces;
-
- /// <summary>
- /// Command to cancel a scan that is in progress
- /// </summary>
- public class CancelScanCommand : ICommand
- {
- /// <summary>
- /// The scan service wrapper.
- /// </summary>
- private readonly IScan scanServiceWrapper;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CancelScanCommand"/> class.
- /// </summary>
- /// <param name="ssw">
- /// The scan service wrapper.
- /// </param>
- public CancelScanCommand(IScan ssw)
- {
- this.scanServiceWrapper = ssw;
- this.scanServiceWrapper.ScanStarted += this.ScanServiceWrapperScanStared;
- this.scanServiceWrapper.ScanCompleted += this.ScanServiceWrapperScanCompleted;
- }
-
- /// <summary>
- /// The scan service Scan Completed Event Handler.
- /// Fires CanExecuteChanged
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The ScanCompletedEventArgs.
- /// </param>
- private void ScanServiceWrapperScanCompleted(object sender, ScanCompletedEventArgs e)
- {
- Caliburn.Micro.Execute.OnUIThread(this.OnCanExecuteChanged);
- }
-
- /// <summary>
- /// The scan service scan started event handler.
- /// Fires CanExecuteChanged
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The EventArgs.
- /// </param>
- private void ScanServiceWrapperScanStared(object sender, EventArgs e)
- {
- Caliburn.Micro.Execute.OnUIThread(this.OnCanExecuteChanged);
- }
-
- #region Implementation of ICommand
-
- /// <summary>
- /// Defines the method to be called when the command is invoked.
- /// </summary>
- /// <param name="parameter">Data used by the command. If the command does not require data to be passed, this object can be set to null.</param>
- public void Execute(object parameter)
- {
- this.scanServiceWrapper.Stop();
- }
-
- /// <summary>
- /// Defines the method that determines whether the command can execute in its current state.
- /// </summary>
- /// <returns>
- /// true if this command can be executed; otherwise, false.
- /// </returns>
- /// <param name="parameter">Data used by the command. If the command does not require data to be passed, this object can be set to null.</param>
- public bool CanExecute(object parameter)
- {
- if (this.scanServiceWrapper != null)
- {
- return this.scanServiceWrapper.IsScanning;
- }
-
- return false;
- }
-
- /// <summary>
- /// The can execute changed.
- /// </summary>
- public event EventHandler CanExecuteChanged;
-
- /// <summary>
- /// The on can execute changed.
- /// </summary>
- protected virtual void OnCanExecuteChanged()
- {
- EventHandler handler = this.CanExecuteChanged;
- if (handler != null)
- {
- handler(this, EventArgs.Empty);
- }
- }
-
- #endregion
- }
-}
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index 61cc11def..7758c7327 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -127,7 +127,6 @@
<Compile Include="AppArguments.cs" />
<Compile Include="AttachedProperties\MenuItemExtensions.cs" />
<Compile Include="Collections\SerializableDictionary.cs" />
- <Compile Include="Commands\CancelScanCommand.cs" />
<Compile Include="Commands\InputBindingTrigger.cs" />
<Compile Include="Commands\Interfaces\IAdvancedEncoderOptionsCommand.cs" />
<Compile Include="Commands\OpenOptionsScreenCommand.cs" />
@@ -217,7 +216,6 @@
<Compile Include="Converters\Video\VideoEncoderConverter.cs" />
<Compile Include="Converters\Video\EncoderOptionsTooltipConverter.cs" />
<Compile Include="Helpers\GrayscaleImage.cs" />
- <Compile Include="Helpers\AppStyleHelper.cs" />
<Compile Include="Helpers\PictureSize.cs" />
<Compile Include="Model\OptionsTab.cs" />
<Compile Include="Model\SelectionTitle.cs" />
diff --git a/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs b/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
deleted file mode 100644
index ece44cfec..000000000
--- a/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <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 HandBrakeWPF.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;
- }
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index e79141139..f248ee1e2 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -963,8 +963,7 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to WARNING: This feature is experimental and has known issues. Suitable for testing only!
- ///Accelerates H.264, MPEG-4, VC1 and WMV3 only and can provide a small improvement on low end hardware..
+ /// Looks up a localized string similar to Accelerates H.264, MPEG-4, VC1 and WMV3 and can provide a small speed improvement on lower end hardware..
/// </summary>
public static string Video_DxvaDecode {
get {
@@ -1102,13 +1101,13 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to QuickSync hardware not detected!
+ /// Looks up a localized string similar to QuickSync hardware not detected or enabled!
///
///In order to use the QuickSync encoder, you must:
///
///- Have a Intel CPU with HD Graphics and QuickSync support. 4th Generation Haswell or newer parts are recommended for best quality.
- ///- Have the HD Graphics enabled.
- ///- On older versions of windows before 8.x, a monitor connected to the HD Graphics or GPU Virtualisation software installed is also required..
+ ///- Have the HD Graphics enabled.
+ ///- On older versions of windows before 8, a monitor connected to the HD Graphics or GPU Virtualisation software installed is also required..
/// </summary>
public static string Video_QuickSyncNotAvailable {
get {
@@ -1117,7 +1116,7 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to WARNING: OpenCL scaling is still in beta. It is only available for modern graphics cards that support OpenCL 1.1 or later. It will fallback to Lanczos software scaling when it is not available for use. Performance gain up to 5%. Minor decrease in quality in some cases..
+ /// Looks up a localized string similar to Requires a graphics card that supports OpenCL 1.1 or later. It will fallback to Lanczos software scaling when it is not available for use. Performance gain up to 5%. Minor decrease in quality in some cases..
/// </summary>
public static string Video_ScalingModes {
get {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index 72cdf9600..c51a184dd 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -347,20 +347,19 @@ If you do not use this tab, it can be hidden from: Tools Menu &gt; Options &gt;
<value>Placebo Quality |</value>
</data>
<data name="Video_DxvaDecode" xml:space="preserve">
- <value>WARNING: This feature is experimental and has known issues. Suitable for testing only!
-Accelerates H.264, MPEG-4, VC1 and WMV3 only and can provide a small improvement on low end hardware.</value>
+ <value>Accelerates H.264, MPEG-4, VC1 and WMV3 and can provide a small speed improvement on lower end hardware.</value>
</data>
<data name="Video_QuickSyncNotAvailable" xml:space="preserve">
- <value>QuickSync hardware not detected!
+ <value>QuickSync hardware not detected or enabled!
In order to use the QuickSync encoder, you must:
- Have a Intel CPU with HD Graphics and QuickSync support. 4th Generation Haswell or newer parts are recommended for best quality.
-- Have the HD Graphics enabled.
-- On older versions of windows before 8.x, a monitor connected to the HD Graphics or GPU Virtualisation software installed is also required.</value>
+- Have the HD Graphics enabled.
+- On older versions of windows before 8, a monitor connected to the HD Graphics or GPU Virtualisation software installed is also required.</value>
</data>
<data name="Video_ScalingModes" xml:space="preserve">
- <value>WARNING: OpenCL scaling is still in beta. It is only available for modern graphics cards that support OpenCL 1.1 or later. It will fallback to Lanczos software scaling when it is not available for use. Performance gain up to 5%. Minor decrease in quality in some cases.</value>
+ <value>Requires a graphics card that supports OpenCL 1.1 or later. It will fallback to Lanczos software scaling when it is not available for use. Performance gain up to 5%. Minor decrease in quality in some cases.</value>
</data>
<data name="Error" xml:space="preserve">
<value>Error</value>
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs
index 1c5464079..71fa1fd84 100644
--- a/win/CS/HandBrakeWPF/UserSettingConstants.cs
+++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs
@@ -162,11 +162,6 @@ namespace HandBrakeWPF
public const string ShowPresetPanel = "ShowPresetPanel";
/// <summary>
- /// The use system colours.
- /// </summary>
- public const string UseSystemColours = "UseSystemColours";
-
- /// <summary>
/// The reset when done action.
/// </summary>
public const string ResetWhenDoneAction = "ResetWhenDoneAction";
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index a7c905f67..f568a5ddf 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -16,14 +16,12 @@ namespace HandBrakeWPF.ViewModels
using Caliburn.Micro;
- using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrake.ApplicationServices.Services.Encode.Model;
using HandBrake.ApplicationServices.Services.Encode.Model.Models;
using HandBrake.ApplicationServices.Services.Scan.Model;
using HandBrake.ApplicationServices.Utilities;
- using HandBrake.ApplicationServices.Interop.Model.Encoding;
- using HandBrakeWPF.Commands;
using HandBrakeWPF.Model.Audio;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.Services.Presets.Model;
@@ -287,7 +285,7 @@ namespace HandBrakeWPF.ViewModels
{
this.NotifyOfPropertyChange(() => this.Task);
- if (Task.OutputFormat == OutputFormat.Mp4)
+ if (this.Task.OutputFormat == OutputFormat.Mp4)
{
foreach (AudioTrack track in this.Task.AudioTracks.Where(track => track.Encoder == AudioEncoder.ffflac || track.Encoder == AudioEncoder.Vorbis))
{
@@ -321,7 +319,7 @@ namespace HandBrakeWPF.ViewModels
{
if (this.SelectedAvailableToMove.Count > 0)
{
- List<string> copiedList = SelectedAvailableToMove.ToList();
+ List<string> copiedList = this.SelectedAvailableToMove.ToList();
foreach (string item in copiedList)
{
this.AvailableLanguages.Remove(item);
@@ -339,7 +337,7 @@ namespace HandBrakeWPF.ViewModels
{
if (this.SelectedLangaugesToMove.Count > 0)
{
- List<string> copiedList = SelectedLangaugesToMove.ToList();
+ List<string> copiedList = this.SelectedLangaugesToMove.ToList();
foreach (string item in copiedList)
{
this.AudioBehaviours.SelectedLangauges.Remove(item);
@@ -404,7 +402,7 @@ namespace HandBrakeWPF.ViewModels
public void UpdateTask(EncodeTask task)
{
this.Task = task;
- this.NotifyOfPropertyChange(() => Task.AudioTracks);
+ this.NotifyOfPropertyChange(() => this.Task.AudioTracks);
this.NotifyOfPropertyChange(() => this.Task);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index d5ed439bb..b16b73573 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -273,8 +273,9 @@ namespace HandBrakeWPF.ViewModels
this.userSettingService.SettingChanged += this.UserSettingServiceSettingChanged;
this.Presets = this.presetService.Presets;
- this.CancelScanCommand = new CancelScanCommand(this.scanService);
this.Drives = new BindingList<SourceMenuItem>();
+
+ HandBrakeInstanceManager.Init();
}
#region View Model Properties
@@ -670,11 +671,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets or sets the cancel scan command.
- /// </summary>
- public CancelScanCommand CancelScanCommand { get; set; }
-
- /// <summary>
/// Gets or sets Destination.
/// </summary>
public string Destination
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 2e73657cb..01c0d38f9 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -273,11 +273,6 @@ namespace HandBrakeWPF.ViewModels
private bool removePunctuation;
/// <summary>
- /// The use system colours for styles.
- /// </summary>
- private bool useSystemColoursForStyles;
-
- /// <summary>
/// The reset when done action.
/// </summary>
private bool resetWhenDoneAction;
@@ -566,21 +561,6 @@ namespace HandBrakeWPF.ViewModels
}
}
- /// <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
@@ -1387,7 +1367,6 @@ 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);
this.ResetWhenDoneAction = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ResetWhenDoneAction);
// #############################
@@ -1517,7 +1496,6 @@ 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);
this.userSettingService.SetUserSetting(UserSettingConstants.ResetWhenDoneAction, this.ResetWhenDoneAction);
/* Output Files */
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
index 1e6946b8a..a0e2a8301 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
{
using Caliburn.Micro;
- using HandBrakeWPF.Helpers;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -65,17 +64,6 @@ 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; }
diff --git a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
index f825fb64f..9940282c7 100644
--- a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
@@ -33,16 +33,6 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
- <Grid.Style>
- <Style TargetType="Grid">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="#FFF1F0EF" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
-
<TextBlock Text="Add Preset" FontSize="26" FontFamily="Segoe UI Light" FontWeight="Bold" Margin="10,10,10,10" Grid.Row="0" />
<!-- Header -->
@@ -125,16 +115,6 @@
<!-- Controls -->
<Grid Grid.Row="3"
Margin="0,20,0,0">
-
- <Grid.Style>
- <Style TargetType="Grid">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="LightGray" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index 5dee3ee2d..b2aa68f5e 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -106,25 +106,11 @@
dd:DragDrop.IsDropTarget="True"
ItemsSource="{Binding Task.AudioTracks}"
SelectionMode="Extended">
- <ListBox.Style>
- <Style TargetType="ListBox">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="LightGray" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ListBox.Style>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Margin" Value="0,0,0,1" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding DataContext.UseSystemColours, ElementName=audioTab}" Value="False">
- <Setter Property="Background" Value="WhiteSmoke" />
- </DataTrigger>
- </Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
diff --git a/win/CS/HandBrakeWPF/Views/ErrorView.xaml b/win/CS/HandBrakeWPF/Views/ErrorView.xaml
index 54cb7a2e6..8053205fe 100644
--- a/win/CS/HandBrakeWPF/Views/ErrorView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ErrorView.xaml
@@ -7,7 +7,6 @@
Height="380"
MinWidth="680"
MinHeight="380"
- Style="{StaticResource windowStyle}"
FontSize="11"
TextOptions.TextFormattingMode="Display"
WindowStartupLocation="CenterOwner">
@@ -23,16 +22,6 @@
Margin="0,0,0,0"
Orientation="Horizontal">
- <StackPanel.Style>
- <Style TargetType="StackPanel">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="White" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </StackPanel.Style>
-
<Image Width="64"
Height="64"
Margin="10,4,0,4"
@@ -78,16 +67,6 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Grid.Style>
- <Style TargetType="Grid">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="LightGray" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
-
<Button Grid.Column="1"
Margin="5"
cal:Message.Attach="[Event Click] = [Action Copy]"
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 9eae091a8..80ff24c61 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -533,16 +533,6 @@
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="0,2,0,2" />
<Style.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsBuildIn}" Value="True" />
- <Condition Binding="{Binding DataContext.UseSystemColours, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="False" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Foreground" Value="DarkBlue" />
- </MultiDataTrigger>
- <!--<DataTrigger Binding="{Binding IsBuildIn}" Value="True">
- <Setter Property="Foreground" Value="DarkBlue" />
- </DataTrigger>-->
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Background" Value="Transparent"/>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 3397699a0..ad8e7ad49 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -2,8 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
xmlns:Options="clr-namespace:HandBrakeWPF.Converters.Options"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" xmlns:local="clr-namespace:HandBrakeWPF.Model"
- xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
- Style="{StaticResource whiteUserControlStyle}">
+ xmlns:Properties="clr-namespace:HandBrakeWPF.Properties">
<UserControl.Resources>
<Style TargetType="Button">
@@ -133,9 +132,9 @@
<StackPanel Orientation="Vertical" Margin="0,0,0,20">
- <TextBlock Text="Path to VLC Player" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>
+ <TextBlock Text="Path to VLC Player" FontSize="14" Margin="0,0,0,10"/>
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="Path:" />
@@ -150,12 +149,9 @@
<StackPanel Orientation="Vertical" Margin="0,0,0,20">
- <TextBlock Text="User Interface" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>
+ <TextBlock Text="User Interface" FontSize="14" Margin="0,0,0,10"/>
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
-
- <CheckBox Content="Always use System Colours (Requires Restart)"
- ToolTip="Note: This option will always be on for systems with a High Contrast Theme selected." IsChecked="{Binding UseSystemColoursForStylesForStyles}" />
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">
<CheckBox Content="Minimize to system tray (Requires Restart)" IsChecked="{Binding MinimiseToTray}" />
<CheckBox Content="Disable preset update notification on startup" IsChecked="{Binding DisablePresetUpdateCheckNotification}" />
<CheckBox Content="Always clear completed queue items after an encode completes" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />
@@ -376,15 +372,6 @@
</ScrollViewer>
<StackPanel HorizontalAlignment="Stretch" Grid.Row="2" Grid.Column="0" >
- <StackPanel.Style>
- <Style TargetType="StackPanel">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="LightGray" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </StackPanel.Style>
<Button Content="&#60; Back" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"
HorizontalAlignment="Center" Padding="12,2" Margin="0,5,10,5" FontWeight="Bold" />
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index e2eda58c9..b5efe838c 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -18,7 +18,6 @@
Height="500"
MinWidth="350"
MinHeight="250"
- Style="{StaticResource windowStyle}"
WindowStartupLocation="CenterScreen"
TextOptions.TextFormattingMode="Display"
mc:Ignorable="d">
@@ -204,16 +203,6 @@
</commands:InputBindingTrigger>
</i:Interaction.Triggers>
- <ListBox.Style>
- <Style TargetType="ListBox">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="LightGray" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ListBox.Style>
-
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="Clear Completed" />
@@ -279,12 +268,7 @@
</Setter.Value>
</Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding DataContext.UseSystemColours, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
- <Setter Property="Background" Value="WhiteSmoke" />
- </DataTrigger>
- </Style.Triggers>
-
+
</Style>
</ListBox.ItemContainerStyle>
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml
index cdfc8d588..9cc976584 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml
@@ -15,7 +15,6 @@
UseLayoutRounding="True"
WindowStartupLocation="CenterScreen"
TextOptions.TextFormattingMode="Display"
- Style="{StaticResource windowStyle}"
x:Name="shellView"
>
<Window.Resources>
diff --git a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml
index 5c637fc9b..247819000 100644
--- a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml
+++ b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml
@@ -1,56 +1,10 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style x:Key="windowStyle" TargetType="Window">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="#FFF0F0F0" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
<Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
</Style>
- <Style x:Key="whiteUserControlStyle" TargetType="UserControl">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="White" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <Style x:Key="{x:Type StatusBar}" TargetType="{x:Type StatusBar}">
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type StatusBar}">
- <Border Padding="1">
- <Border.Style>
- <Style TargetType="Border">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="#FAFAFA" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
- <ItemsPresenter Margin="0" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="{x:Type GroupBox}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="White" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
<Style TargetType="{x:Type ComboBox}">
<Setter Property="MinHeight" Value="22"/>
<Setter Property="Margin" Value="0,2,0,2" />
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
index 77f4fc2d6..1ef7f70c6 100644
--- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
@@ -107,25 +107,11 @@
dd:DragDrop.IsDropTarget="True"
ItemsSource="{Binding Task.SubtitleTracks}"
SelectionMode="Extended">
- <ListBox.Style>
- <Style TargetType="ListBox">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="LightGray" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ListBox.Style>
-
+
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Margin" Value="0,0,0,1" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding DataContext.UseSystemColours, ElementName=subTab}" Value="False">
- <Setter Property="Background" Value="WhiteSmoke" />
- </DataTrigger>
- </Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml
index 5c677bcef..4d695271e 100644
--- a/win/CS/HandBrakeWPF/defaultsettings.xml
+++ b/win/CS/HandBrakeWPF/defaultsettings.xml
@@ -418,15 +418,6 @@
</item>
<item>
<key>
- <string>UseSystemColours</string>
- </key>
- <value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
- </value>
- </item>
-
- <item>
- <key>
<string>EnableQuickSync</string>
</key>
<value>