diff options
author | sr55 <[email protected]> | 2012-04-01 17:07:05 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-04-01 17:07:05 +0000 |
commit | b07bb66a24127135b5b921db6486f1cad45f42cc (patch) | |
tree | 6b02a41cf78cb1b415c968b2399e6c64aeca1243 /win/CS | |
parent | 12d9b4d8ae55f94eda8bccc6edc07dca1c69a7ad (diff) |
WinGui: (WPF) Bug fixes to the advanced panel
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4578 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/AdvancedChoicesHelper.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs | 14 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AdvancedView.xaml | 8 | ||||
-rw-r--r-- | win/CS/frmMain.cs | 2 |
4 files changed, 22 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/AdvancedChoicesHelper.cs b/win/CS/HandBrakeWPF/Helpers/AdvancedChoicesHelper.cs index 8c521d9e7..68d64eca3 100644 --- a/win/CS/HandBrakeWPF/Helpers/AdvancedChoicesHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/AdvancedChoicesHelper.cs @@ -145,8 +145,9 @@ namespace HandBrakeWPF.Helpers analysis = new List<AdvancedChoice>
{
+ new AdvancedChoice { Label = "Most (Default)", IsDefault = true },
new AdvancedChoice { Label = "None", Value = "none" },
- new AdvancedChoice { Label = "Some (Default)", IsDefault = true },
+ new AdvancedChoice { Label = "Some", Value = "i4x4,i8x8", },
new AdvancedChoice { Label = "All", Value = "all" }
};
@@ -351,6 +352,7 @@ namespace HandBrakeWPF.Helpers /// The default number.
/// </param>
/// <returns>
+ /// List of Advanced Choices Options.
/// </returns>
private static List<AdvancedChoice> CreateNumberList(int lower, int upper, int defaultNumber)
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs index 0d65ff5be..39861bce7 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs @@ -524,6 +524,19 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
+ /// Gets a value indicating whether PsychovisualRateDistortionVisible.
+ /// </summary>
+ public bool PsychovisualRateDistortionVisible
+ {
+ get
+ {
+ int value;
+ int.TryParse(this.SubpixelMotionEstimation.Value.Trim(), out value);
+ return value >= 6;
+ }
+ }
+
+ /// <summary>
/// Gets or sets PyramidalBFrames.
/// </summary>
public AdvancedChoice PyramidalBFrames
@@ -584,6 +597,7 @@ namespace HandBrakeWPF.ViewModels {
this.subpixelMotionEstimation = value;
this.NotifyOfPropertyChange(() => this.SubpixelMotionEstimation);
+ this.NotifyOfPropertyChange(() => this.PsychovisualRateDistortionVisible);
this.UpdateOptionsString();
}
}
diff --git a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml index 4221a8e5d..92923f6c8 100644 --- a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml +++ b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml @@ -231,10 +231,12 @@ </Slider.ToolTip>
</Slider>
- <Label Content="Psychovisual Rate Distortion:" Grid.Row="1" Grid.Column="0" Style="{StaticResource AdvancedLabel}" />
+ <Label Content="Psychovisual Rate Distortion:" Grid.Row="1" Grid.Column="0" Style="{StaticResource AdvancedLabel}"
+ Visibility="{Binding PsychovisualRateDistortionVisible, Converter={StaticResource VisibilityConverter}}" />
<Slider Grid.Row="1" Grid.Column="1" Minimum="0.0" Maximum="2.0" TickPlacement="BottomRight"
- TickFrequency="0.1" SmallChange="0.1" LargeChange="0.2" IsSnapToTickEnabled="True"
- Value="{Binding PsychovisualRateDistortion}" Style="{StaticResource LongToolTipHolder}">
+ TickFrequency="0.1" SmallChange="0.1" LargeChange="0.2" IsSnapToTickEnabled="True"
+ Visibility="{Binding PsychovisualRateDistortionVisible, Converter={StaticResource VisibilityConverter}}"
+ Value="{Binding PsychovisualRateDistortion}" Style="{StaticResource LongToolTipHolder}">
<Slider.ToolTip>
<TextBlock Text="{x:Static Properties:Resources.Advanced_PsychovisualRateDistortionToolTip}" Style="{StaticResource LongToolTip}" />
</Slider.ToolTip>
diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index 9242bac0b..930828b7d 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -3,8 +3,6 @@ Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License. */
-using HandBrake.ApplicationServices.Model.Encoding;
-
namespace Handbrake
{
using System;
|