diff options
author | sr55 <[email protected]> | 2013-04-21 14:49:48 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-04-21 14:49:48 +0000 |
commit | ac2211517fc430c95dbec662acd177c38882fa90 (patch) | |
tree | 6263314b0c9cd950dc0df5d2680c402c5486a2d8 /win | |
parent | 76d311c9aa5e4e6b58dfd1d570d275caf44051c4 (diff) |
WinGui: Disable Custom Anamorphic calculations (Will implement these via libhb after the next release) but leave the options as passthru only. Hide the Keep AR checkbox when it's not applicable.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5406 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 31 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml | 5 |
2 files changed, 33 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 963f7ef68..1a6c90538 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -93,6 +93,11 @@ namespace HandBrakeWPF.ViewModels /// </summary>
private int maxWidth;
+ /// <summary>
+ /// The show keep ar backing field.
+ /// </summary>
+ private bool showKeepAr = true;
+
#endregion
#region Constructors and Destructors
@@ -561,6 +566,22 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether show keep ar.
+ /// </summary>
+ public bool ShowKeepAR
+ {
+ get
+ {
+ return this.showKeepAr;
+ }
+ set
+ {
+ this.showKeepAr = value;
+ this.NotifyOfPropertyChange(() => this.ShowKeepAR);
+ }
+ }
+
#endregion
#region Implemented Interfaces
@@ -781,6 +802,7 @@ namespace HandBrakeWPF.ViewModels this.CalculateAnamorphicSizes().Height);
this.ShowDisplaySize = true;
+ this.ShowKeepAR = true;
switch (this.SelectedAnamorphicMode)
{
case Anamorphic.None:
@@ -789,6 +811,7 @@ namespace HandBrakeWPF.ViewModels this.ShowCustomAnamorphicControls = false;
this.ShowModulus = true;
this.ShowDisplaySize = false;
+ this.ShowKeepAR = true;
this.SelectedModulus = 16; // Reset
this.Width = this.sourceResolution.Width;
this.SetDisplaySize();
@@ -799,6 +822,7 @@ namespace HandBrakeWPF.ViewModels this.ShowCustomAnamorphicControls = false;
this.ShowModulus = false;
this.SelectedModulus = 16; // Reset
+ this.ShowKeepAR = false;
this.Width = 0;
this.Height = 0;
@@ -812,6 +836,7 @@ namespace HandBrakeWPF.ViewModels this.ShowModulus = true;
this.Width = this.sourceResolution.Width;
this.Height = 0;
+ this.ShowKeepAR = false;
this.SetDisplaySize();
break;
@@ -820,8 +845,10 @@ namespace HandBrakeWPF.ViewModels this.WidthControlEnabled = true;
this.HeightControlEnabled = true;
this.ShowCustomAnamorphicControls = true;
- this.MaintainAspectRatio = true;
+ this.MaintainAspectRatio = false; // TODO Fix when implementing custom
this.ShowModulus = true;
+ this.ShowDisplaySize = false; // Disabled for Custom until we implement it properly. TODO
+ this.ShowKeepAR = false;
// Ignore any of the users current settings and reset to source to make things easier.
this.Width = this.sourceResolution.Width;
@@ -835,7 +862,7 @@ namespace HandBrakeWPF.ViewModels this.DisplayWidth = (this.Width * this.ParWidth / this.ParHeight);
}
- this.SetDisplaySize();
+ //this.SetDisplaySize();
break;
}
}
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml index e7f5bbb35..c9aa0d69b 100644 --- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml +++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml @@ -7,6 +7,7 @@ <UserControl.Resources>
<Converters:BooleanConverter x:Key="boolConverter" />
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Converters:BooleanToHiddenVisibilityConverter x:Key="boolToVisHiddenConverter" />
<Style TargetType="controls:NumberBox">
<Setter Property="Height" Value="24" />
</Style>
@@ -32,7 +33,9 @@ <Label Content="Height:" Grid.Row="1" Grid.Column="2" />
<controls:NumberBox Number="{Binding Height, Mode=TwoWay}" IsEnabled="{Binding HeightControlEnabled}" Modulus="{Binding SelectedModulus, Mode=OneWay}"
Minimum="0" Grid.Row="1" Grid.Column="3" Width="60" />
- <CheckBox Content="Keep Aspect Ratio" IsChecked="{Binding MaintainAspectRatio}" VerticalAlignment="Center" Margin="5,0,0,0" />
+ <CheckBox Content="Keep Aspect Ratio" IsChecked="{Binding MaintainAspectRatio}"
+ Visibility="{Binding ShowKeepAR, Converter={StaticResource boolToVisHiddenConverter}}"
+ VerticalAlignment="Center" Margin="5,0,0,0" />
</StackPanel>
<!-- Row 3-->
|