From ac2211517fc430c95dbec662acd177c38882fa90 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 21 Apr 2013 14:49:48 +0000 Subject: 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 --- .../ViewModels/PictureSettingsViewModel.cs | 31 ++++++++++++++++++++-- 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 /// private int maxWidth; + /// + /// The show keep ar backing field. + /// + private bool showKeepAr = true; + #endregion #region Constructors and Destructors @@ -561,6 +566,22 @@ namespace HandBrakeWPF.ViewModels } } + /// + /// Gets or sets a value indicating whether show keep ar. + /// + 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 @@ + @@ -32,7 +33,9 @@