diff options
author | sr55 <[email protected]> | 2013-01-17 22:29:37 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-01-17 22:29:37 +0000 |
commit | 7dd8b460af31e84d3b1cb82b63f03464dbadf3ee (patch) | |
tree | 83399a9a0e8a942831a2fb6d7a4d849100b6ad7b /win/CS | |
parent | 6f7272a5caf858b0dd461eee74654c1e4d54500b (diff) |
WinGui: UI Tweaks.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5180 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
14 files changed, 406 insertions, 42 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/SettingChangedEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/SettingChangedEventArgs.cs new file mode 100644 index 000000000..2687508b2 --- /dev/null +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/SettingChangedEventArgs.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SettingChangedEventArgs.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>
+// The setting changed event args.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.ApplicationServices.EventArgs
+{
+ /// <summary>
+ /// The setting changed event args.
+ /// </summary>
+ public class SettingChangedEventArgs
+ {
+ /// <summary>
+ /// Gets or sets the key.
+ /// </summary>
+ public string Key { get; set; }
+
+ /// <summary>
+ /// Gets or sets the value.
+ /// </summary>
+ public object Value { get; set; }
+ }
+}
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 6730e2d66..efeeffb47 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -83,6 +83,7 @@ <ItemGroup>
<Compile Include="Collections\SerializableDictionary.cs" />
<Compile Include="Converters\EnumToDescConverter.cs" />
+ <Compile Include="EventArgs\SettingChangedEventArgs.cs" />
<Compile Include="Exceptions\GeneralApplicationException.cs" />
<Compile Include="EventArgs\EncodeCompletedEventArgs.cs" />
<Compile Include="EventArgs\EncodeProgressEventArgs.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs index 554f78c35..6fcf10b57 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs @@ -12,6 +12,8 @@ namespace HandBrake.ApplicationServices.Model using System.Collections.ObjectModel;
using System.Linq;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
@@ -22,8 +24,17 @@ namespace HandBrake.ApplicationServices.Model /// <summary>
/// An Encode Task
/// </summary>
- public class EncodeTask
+ public class EncodeTask : PropertyChangedBase
{
+ #region Private Fields
+
+ /// <summary>
+ /// The advanced panel enabled.
+ /// </summary>
+ private bool showAdvancedTab;
+
+ #endregion
+
/// <summary>
/// Initializes a new instance of the <see cref="EncodeTask"/> class.
/// </summary>
@@ -424,7 +435,7 @@ namespace HandBrake.ApplicationServices.Model public bool FastDecode { get; set; }
/// <summary>
- /// Extra Advanced Arguments for the Video Tab.
+ /// Gets or sets Extra Advanced Arguments for the Video Tab.
/// </summary>
public string ExtraAdvancedArguments { get; set; }
@@ -481,6 +492,25 @@ namespace HandBrake.ApplicationServices.Model /// Gets or sets PreviewEncodeStartAt.
/// </summary>
public string PreviewEncodeStartAt { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether advanced panel enabled.
+ /// </summary>
+ public bool ShowAdvancedTab
+ {
+ get
+ {
+ return this.showAdvancedTab;
+ }
+ set
+ {
+ if (!object.Equals(value, this.showAdvancedTab))
+ {
+ this.showAdvancedTab = value;
+ this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
+ }
+ }
+ }
#endregion
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs index d7bba9550..bf6cb9c91 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs @@ -9,12 +9,30 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
{
+ using HandBrake.ApplicationServices.EventArgs;
+
+ /// <summary>
+ /// The setting event handler.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ public delegate void SettingEventHandler(object sender, SettingChangedEventArgs e);
+
/// <summary>
/// The User Setting Service Interace.
/// </summary>
public interface IUserSettingService
{
/// <summary>
+ /// The setting changed.
+ /// </summary>
+ event SettingEventHandler SettingChanged;
+
+ /// <summary>
/// Set the specified user setting.
/// </summary>
/// <param name="name">
diff --git a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs index ab77ce800..db7389637 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs @@ -16,6 +16,7 @@ namespace HandBrake.ApplicationServices.Services using System.Xml.Serialization;
using HandBrake.ApplicationServices.Collections;
+ using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -48,6 +49,11 @@ namespace HandBrake.ApplicationServices.Services }
/// <summary>
+ /// The setting changed.
+ /// </summary>
+ public event SettingEventHandler SettingChanged;
+
+ /// <summary>
/// Set the specified user setting.
/// </summary>
/// <param name="name">
@@ -60,6 +66,8 @@ namespace HandBrake.ApplicationServices.Services {
this.userSettings[name] = value;
this.Save();
+
+ this.OnSettingChanged(new SettingChangedEventArgs {Key = name, Value = value});
}
/// <summary>
@@ -99,6 +107,21 @@ namespace HandBrake.ApplicationServices.Services }
/// <summary>
+ /// The on setting changed.
+ /// </summary>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ protected virtual void OnSettingChanged(SettingChangedEventArgs e)
+ {
+ SettingEventHandler handler = this.SettingChanged;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
+ }
+
+ /// <summary>
/// Save the User Settings
/// </summary>
private void Save()
diff --git a/win/CS/HandBrakeWPF/Converters/InverseBooleanConverter.cs b/win/CS/HandBrakeWPF/Converters/InverseBooleanConverter.cs new file mode 100644 index 000000000..f44e18a3e --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/InverseBooleanConverter.cs @@ -0,0 +1,81 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="InverseBooleanConverter.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>
+// The inverse boolean converter.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Converters
+{
+ using System;
+ using System.Globalization;
+ using System.Windows.Data;
+
+ /// <summary>
+ /// The inverse boolean converter.
+ /// </summary>
+ [ValueConversion(typeof(bool), typeof(bool))]
+ public class InverseBooleanConverter : IValueConverter
+ {
+ #region Implemented Interfaces
+
+ #region IValueConverter
+
+ /// <summary>
+ /// The convert.
+ /// </summary>
+ /// <param name="value">
+ /// The value.
+ /// </param>
+ /// <param name="targetType">
+ /// The target type.
+ /// </param>
+ /// <param name="parameter">
+ /// The parameter.
+ /// </param>
+ /// <param name="culture">
+ /// The culture.
+ /// </param>
+ /// <returns>
+ /// The <see cref="object"/>.
+ /// </returns>
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (targetType != typeof(bool))
+ {
+ throw new InvalidOperationException("The target must be a boolean");
+ }
+
+ return !(bool)value;
+ }
+
+ /// <summary>
+ /// The convert back.
+ /// </summary>
+ /// <param name="value">
+ /// The value.
+ /// </param>
+ /// <param name="targetType">
+ /// The target type.
+ /// </param>
+ /// <param name="parameter">
+ /// The parameter.
+ /// </param>
+ /// <param name="culture">
+ /// The culture.
+ /// </param>
+ /// <returns>
+ /// The <see cref="object"/>.
+ /// </returns>
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index e11f8e8f9..a7076bf6e 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -143,6 +143,7 @@ <Compile Include="Converters\Audio\AudioEncoderConverter.cs" />
<Compile Include="Converters\Audio\AudioQueueDisplayConverter.cs" />
<Compile Include="Converters\BooleanToHiddenVisibilityConverter.cs" />
+ <Compile Include="Converters\InverseBooleanConverter.cs" />
<Compile Include="Converters\Options\OptionsTabConverter.cs" />
<Compile Include="Converters\Options\OptionsTabNameConverter.cs" />
<Compile Include="Converters\Subtitles\SubtitlesQueueDisplayConverter.cs" />
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 5adc38011..d68bf4f58 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -216,7 +216,7 @@ namespace HandBrakeWPF.Properties { /// <summary>
/// Looks up a localized string similar to This is the distance x264 searches from its best guess at the motion of a block in order to try to find its actual motion.
- ///Doesn't apply to Diamond or Hexagon search options.
+ ///
///The default is fine for most content, but extremely high motion video, especially at HD resolutions, may benefit from higher ranges, albeit at a high speed cost..
/// </summary>
public static string Advanced_MotionEstimationRangeToolTip {
@@ -237,6 +237,17 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to The x264 Preset / Tune / Profile and Level options are currently in use on the Video Tab.
+ ///
+ ///If you do not use this tab, it can be hidden from: Tools Menu > Options > Advanced..
+ /// </summary>
+ public static string Advanced_NotInUse {
+ get {
+ return ResourceManager.GetString("Advanced_NotInUse", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Psychovisual Rate Distortion means x264 tries to retain detail, for better quality to the human eye,
///as opposed to trying to maximize quality the way a computer understands it, through signal-to-noise ratios that have trouble telling apart fine detail and noise..
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 6148d29c6..206313355 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -178,7 +178,7 @@ Transformed Exhaustive: Like exhaustive, but makes even more accurate decisions. </data>
<data name="Advanced_MotionEstimationRangeToolTip" xml:space="preserve">
<value>This is the distance x264 searches from its best guess at the motion of a block in order to try to find its actual motion.
-Doesn't apply to Diamond or Hexagon search options.
+
The default is fine for most content, but extremely high motion video, especially at HD resolutions, may benefit from higher ranges, albeit at a high speed cost.</value>
</data>
<data name="Advanced_NoDctDecimateToolTip" xml:space="preserve">
@@ -321,4 +321,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</value>
</data>
+ <data name="Advanced_NotInUse" xml:space="preserve">
+ <value>The x264 Preset / Tune / Profile and Level options are currently in use on the Video Tab.
+
+If you do not use this tab, it can be hidden from: Tools Menu > Options > Advanced.</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs index 741f31876..1c0f9de67 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs @@ -172,6 +172,9 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Initializes a new instance of the <see cref="AdvancedViewModel"/> class.
/// </summary>
+ /// <param name="advancedEncoderOptionsCommand">
+ /// The advanced Encoder Options Command.
+ /// </param>
public AdvancedViewModel(IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand)
{
this.advancedEncoderOptionsCommand = advancedEncoderOptionsCommand;
@@ -179,11 +182,34 @@ namespace HandBrakeWPF.ViewModels this.UpdateUIFromAdvancedOptions();
}
+ /// <summary>
+ /// The task object property changed.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The PropertyChangedEventArgs.
+ /// </param>
+ private void Task_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == UserSettingConstants.ShowAdvancedTab)
+ {
+ ShowX264AdvancedOptions = this.Task.ShowAdvancedTab;
+ this.NotifyOfPropertyChange(() => ShowX264AdvancedOptions);
+ }
+ }
+
#endregion
#region Properties
/// <summary>
+ /// Gets or sets a value indicating whether show x 264 advanced options.
+ /// </summary>
+ public bool ShowX264AdvancedOptions { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether DisplayX264Options.
/// </summary>
public bool? DisplayX264Options
@@ -195,7 +221,19 @@ namespace HandBrakeWPF.ViewModels set
{
this.displayX264Options = value;
+
+ if (this.displayX264Options == false)
+ {
+ this.ShowX264AdvancedOptions = false;
+ }
+
+ if (this.displayX264Options == true && this.Task.ShowAdvancedTab)
+ {
+ this.ShowX264AdvancedOptions = true;
+ }
+
this.NotifyOfPropertyChange(() => this.DisplayX264Options);
+ this.NotifyOfPropertyChange(() => this.ShowX264AdvancedOptions);
}
}
@@ -959,7 +997,9 @@ namespace HandBrakeWPF.ViewModels /// </param>
public void SetPreset(Preset preset, EncodeTask task)
{
+ this.Task.PropertyChanged -= this.Task_PropertyChanged;
this.Task = task;
+ this.Task.PropertyChanged += this.Task_PropertyChanged;
this.AdvancedOptionsString = preset.Task.AdvancedEncoderOptions;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 335509150..2db2c66c7 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -213,6 +213,7 @@ namespace HandBrakeWPF.ViewModels // Setup Properties
this.WindowTitle = "HandBrake";
this.CurrentTask = new EncodeTask();
+ this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;
this.ScannedSource = new Source();
// Setup Events
@@ -223,6 +224,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.QueueCompleted += this.QueueCompleted;
this.queueProcessor.QueueChanged += this.QueueChanged;
this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged;
+ this.userSettingService.SettingChanged += this.UserSettingServiceSettingChanged;
this.Presets = this.presetService.Presets;
this.CancelScanCommand = new CancelScanCommand(this.scanService);
@@ -885,6 +887,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.QueueChanged -= this.QueueChanged;
this.queueProcessor.JobProcessingStarted -= this.QueueProcessorJobProcessingStarted;
this.queueProcessor.EncodeService.EncodeStatusChanged -= this.EncodeStatusChanged;
+ this.userSettingService.SettingChanged -= this.UserSettingServiceSettingChanged;
}
#endregion
@@ -1860,6 +1863,41 @@ namespace HandBrakeWPF.ViewModels Caliburn.Micro.Execute.OnUIThread(() => this.SourceMenu = this.GenerateSourceMenu());
}
+ /// <summary>
+ /// Allows the main window to respond to setting changes.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void UserSettingServiceSettingChanged(object sender, HandBrake.ApplicationServices.EventArgs.SettingChangedEventArgs e)
+ {
+ if (e.Key == UserSettingConstants.ShowAdvancedTab)
+ {
+ this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
+ }
+ }
+
+ /// <summary>
+ /// Handle the property changed event of the encode task.
+ /// Allows the main window to respond to changes.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void CurrentTask_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == UserSettingConstants.ShowAdvancedTab)
+ {
+ this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
+ }
+ }
+
#endregion
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 6164e3603..a59105084 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -27,6 +27,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.Interop.Model.Encoding.x264;
using HandBrakeWPF.Commands.Interfaces;
+ using HandBrakeWPF.Model;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -95,6 +96,11 @@ namespace HandBrakeWPF.ViewModels /// </summary>
private bool canClear;
+ /// <summary>
+ /// The use advanced tab.
+ /// </summary>
+ private bool useAdvancedTab;
+
#endregion
#region Constructors and Destructors
@@ -122,6 +128,8 @@ namespace HandBrakeWPF.ViewModels H264Profiles = EnumHelper<x264Profile>.GetEnumList();
X264Tunes = EnumHelper<x264Tune>.GetEnumList().Where(t => t != x264Tune.Fastdecode);
this.H264Levels = Levels;
+
+ this.userSettingService.SettingChanged += this.UserSettingServiceSettingChanged;
}
#endregion
@@ -134,6 +142,44 @@ namespace HandBrakeWPF.ViewModels public EncodeTask Task { get; set; }
/// <summary>
+ /// Gets a value indicating whether show advanced tab.
+ /// </summary>
+ public bool ShowAdvancedTab
+ {
+ get
+ {
+ bool showAdvTabSetting =
+ this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab);
+ if (!showAdvTabSetting)
+ {
+ this.UseAdvancedTab = false;
+ }
+
+ return showAdvTabSetting;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether use video tab.
+ /// </summary>
+ public bool UseAdvancedTab
+ {
+ get
+ {
+ return this.useAdvancedTab;
+ }
+ set
+ {
+ if (!object.Equals(value, this.useAdvancedTab))
+ {
+ this.useAdvancedTab = value;
+ this.Task.ShowAdvancedTab = value;
+ this.NotifyOfPropertyChange(() => this.UseAdvancedTab);
+ }
+ }
+ }
+
+ /// <summary>
/// Gets Framerates.
/// </summary>
public IEnumerable<string> Framerates
@@ -335,6 +381,9 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets the rfqp.
+ /// </summary>
public string Rfqp
{
get
@@ -729,6 +778,8 @@ namespace HandBrakeWPF.ViewModels this.H264Level = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.H264Level : "Auto";
this.FastDecode = preset.Task.VideoEncoder == VideoEncoder.X264 && preset.Task.FastDecode;
this.ExtraArguments = preset.Task.ExtraAdvancedArguments;
+
+ this.UseAdvancedTab = !string.IsNullOrEmpty(preset.Task.AdvancedEncoderOptions) && this.ShowAdvancedTab;
}
}
@@ -866,5 +917,22 @@ namespace HandBrakeWPF.ViewModels // TODO figure out what is wrong with this??
return HandBrakeUtils.CreateX264OptionsString(preset, tunes, this.ExtraArguments, profile, this.H264Level, width, height);
}
+
+ /// <summary>
+ /// The user setting service_ setting changed.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void UserSettingServiceSettingChanged(object sender, HandBrake.ApplicationServices.EventArgs.SettingChangedEventArgs e)
+ {
+ if (e.Key == UserSettingConstants.ShowAdvancedTab)
+ {
+ this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
+ }
+ }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml index 785102cd2..b0b7698d2 100644 --- a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml +++ b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml @@ -42,7 +42,7 @@ VerticalAlignment="Center"
FontWeight="Bold"
Text="x264 Encoder Options:"
- Visibility="{Binding DisplayX264Options, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}"
+ Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}"
/>
<TextBox Grid.Row="3"
@@ -54,7 +54,7 @@ Text="{Binding AdvancedOptionsString,
UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"
- Visibility="{Binding DisplayX264Options, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}"
+ Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}"
/>
<StackPanel Orientation="Vertical">
@@ -80,7 +80,11 @@ </Grid>
<!-- X264 -->
- <Grid Visibility="{Binding DisplayX264Options, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}">
+ <TextBlock Text="{x:Static Properties:Resources.Advanced_NotInUse}"
+ TextWrapping="Wrap" Width="480" Margin="0, 100, 0, 0" FontSize="12"
+ Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=true}" />
+
+ <Grid Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index c9b125abe..4cc1b6b9e 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -11,8 +11,9 @@ <Converters:BooleanConverter x:Key="boolConverter" />
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Converters:EnumComboConverter x:Key="enumComboConverter" />
+ <Converters:InverseBooleanConverter x:Key="inverseConverter" />
<Video:VideoEncoderConverter x:Key="videoEncoderConverter" />
-
+
<Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
</Style>
@@ -109,63 +110,79 @@ <Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
-
- <TextBlock Text="Optimise Video:" Margin="0,0,0,8" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontWeight="Bold" VerticalAlignment="Center" />
-
- <!-- Row 1 -->
- <TextBlock Text="x264 Preset:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
- <StackPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Horizontal">
- <Slider Minimum="0" Maximum="9" Width="150" Value="{Binding X264PresetValue, Mode=Default, UpdateSourceTrigger=PropertyChanged}"
+
+ <TextBlock Text="Optimise Video:" Margin="0,0,0,8" Grid.Row="0" Grid.ColumnSpan="2" FontWeight="Bold" VerticalAlignment="Center" />
+
+ <CheckBox Content="Use Advanced Tab instead" Grid.Row="1" IsChecked="{Binding UseAdvancedTab}"
+ Visibility="{Binding ShowAdvancedTab, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+
+ <Grid Grid.Row="2" Margin="0,5,0,0" IsEnabled="{Binding UseAdvancedTab, Converter={StaticResource inverseConverter}}"
+ Visibility="{Binding DisplayX264Options, Converter={StaticResource boolToVisConverter}}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+
+
+ <!-- Row 1 -->
+ <TextBlock Text="x264 Preset:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" />
+ <StackPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Horizontal">
+ <Slider Minimum="0" Maximum="9" Width="150" Value="{Binding X264PresetValue, Mode=Default, UpdateSourceTrigger=PropertyChanged}"
IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" ToolTip="{x:Static Properties:Resources.Video_x264Preset}"
Style="{StaticResource LongToolTipHolder}" />
- <TextBlock Text="{Binding X264Preset, Converter={StaticResource enumComboConverter}}" Margin="5,0,0,0" />
- </StackPanel>
+ <TextBlock Text="{Binding X264Preset, Converter={StaticResource enumComboConverter}}" Margin="5,0,0,0" />
+ </StackPanel>
- <TextBlock Text="x264 Tune:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0,10,0,0" />
- <ComboBox Width="100" Grid.Row="2" Grid.Column="1" Margin="5,10,5,0" Height="22"
+ <TextBlock Text="x264 Tune:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0,10,0,0" />
+ <ComboBox Width="100" Grid.Row="2" Grid.Column="1" Margin="5,10,5,0" Height="22"
ItemsSource="{Binding X264Tunes, Converter={StaticResource enumComboConverter}}"
SelectedItem="{Binding X264Tune, Converter={StaticResource enumComboConverter}}"
ToolTip="{x:Static Properties:Resources.Video_x264Tune}"
Style="{StaticResource LongToolTipHolder}" />
- <CheckBox IsChecked="{Binding FastDecode}" Content="Fast Decode" Grid.Row="2" Grid.Column="2" Margin="10,10,10,0" VerticalAlignment="Center"
+ <CheckBox IsChecked="{Binding FastDecode}" Content="Fast Decode" Grid.Row="2" Grid.Column="2" Margin="10,10,10,0" VerticalAlignment="Center"
ToolTip="{x:Static Properties:Resources.Video_x264FastDecode}"/>
-
- <!-- Row 2-->
- <TextBlock Text="H.264 Profile:" Grid.Row="3" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" />
- <ComboBox Width="100" Grid.Row="3" Grid.Column="1" Margin="5,10,5,0" Height="22" VerticalAlignment="Center"
+
+ <!-- Row 2-->
+ <TextBlock Text="H.264 Profile:" Grid.Row="3" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" />
+ <ComboBox Width="100" Grid.Row="3" Grid.Column="1" Margin="5,10,5,0" Height="22" VerticalAlignment="Center"
ItemsSource="{Binding H264Profiles, Converter={StaticResource enumComboConverter}}"
SelectedItem="{Binding H264Profile, Converter={StaticResource enumComboConverter}}"
Style="{StaticResource LongToolTipHolder}"
ToolTip="{x:Static Properties:Resources.Video_x264Profile}" />
- <TextBlock Text="H.264 Level:" Grid.Row="3" Grid.Column="2" Margin="10,10,0,0" VerticalAlignment="Center" />
- <ComboBox Width="100" Grid.Row="3" Grid.Column="3" Margin="5,10,5,0" Height="22" VerticalAlignment="Center"
+ <TextBlock Text="H.264 Level:" Grid.Row="3" Grid.Column="2" Margin="10,10,0,0" VerticalAlignment="Center" />
+ <ComboBox Width="100" Grid.Row="3" Grid.Column="3" Margin="5,10,5,0" Height="22" VerticalAlignment="Center"
ItemsSource="{Binding H264Levels}"
SelectedItem="{Binding H264Level}"
Style="{StaticResource LongToolTipHolder}"
ToolTip="{x:Static Properties:Resources.Video_x264Level}"/>
-
- <!-- Row 3 -->
- <TextBlock Text="Extra Options:" Grid.Row="4" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
- <TextBox Text="{Binding ExtraArguments, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+
+ <!-- Row 3 -->
+ <TextBlock Text="Extra Options:" Grid.Row="4" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
+ <TextBox Text="{Binding ExtraArguments, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Height="30" MaxLines="2" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Margin="5,10,0,0" VerticalAlignment="Center"
ToolTip="{Binding FullOptionsTooltip}"/>
-
-
+
+
+ </Grid>
</Grid>
+
+
</Grid>
</Grid>
|