]> granicus.if.org Git - handbrake/commitdiff
WinGui: Disable Custom Anamorphic calculations (Will implement these via libhb after...
authorsr55 <sr55.hb@outlook.com>
Sun, 21 Apr 2013 14:49:48 +0000 (14:49 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 21 Apr 2013 14:49:48 +0000 (14:49 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5406 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml

index 963f7ef68d077260d144369b06ec52669e4d12c7..1a6c90538505b1d54d938864f1655142be85c093 100644 (file)
@@ -93,6 +93,11 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         private int maxWidth;\r
 \r
+        /// <summary>\r
+        /// The show keep ar backing field.\r
+        /// </summary>\r
+        private bool showKeepAr = true;\r
+\r
         #endregion\r
 \r
         #region Constructors and Destructors\r
@@ -561,6 +566,22 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether show keep ar.\r
+        /// </summary>\r
+        public bool ShowKeepAR\r
+        {\r
+            get\r
+            {\r
+                return this.showKeepAr;\r
+            }\r
+            set\r
+            {\r
+                this.showKeepAr = value;\r
+                this.NotifyOfPropertyChange(() => this.ShowKeepAR);\r
+            }\r
+        }\r
+\r
         #endregion\r
 \r
         #region Implemented Interfaces\r
@@ -781,6 +802,7 @@ namespace HandBrakeWPF.ViewModels
                                        this.CalculateAnamorphicSizes().Height);\r
 \r
             this.ShowDisplaySize = true;\r
+            this.ShowKeepAR = true;\r
             switch (this.SelectedAnamorphicMode)\r
             {\r
                 case Anamorphic.None:\r
@@ -789,6 +811,7 @@ namespace HandBrakeWPF.ViewModels
                     this.ShowCustomAnamorphicControls = false;\r
                     this.ShowModulus = true;\r
                     this.ShowDisplaySize = false;\r
+                    this.ShowKeepAR = true;\r
                     this.SelectedModulus = 16; // Reset\r
                     this.Width = this.sourceResolution.Width;\r
                     this.SetDisplaySize();\r
@@ -799,6 +822,7 @@ namespace HandBrakeWPF.ViewModels
                     this.ShowCustomAnamorphicControls = false;\r
                     this.ShowModulus = false;\r
                     this.SelectedModulus = 16; // Reset\r
+                    this.ShowKeepAR = false;\r
 \r
                     this.Width = 0;\r
                     this.Height = 0;\r
@@ -812,6 +836,7 @@ namespace HandBrakeWPF.ViewModels
                     this.ShowModulus = true;\r
                     this.Width = this.sourceResolution.Width;\r
                     this.Height = 0;\r
+                    this.ShowKeepAR = false;\r
 \r
                     this.SetDisplaySize();\r
                     break;\r
@@ -820,8 +845,10 @@ namespace HandBrakeWPF.ViewModels
                     this.WidthControlEnabled = true;\r
                     this.HeightControlEnabled = true;\r
                     this.ShowCustomAnamorphicControls = true;\r
-                    this.MaintainAspectRatio = true;\r
+                    this.MaintainAspectRatio = false;  // TODO Fix when implementing custom\r
                     this.ShowModulus = true;\r
+                    this.ShowDisplaySize = false; // Disabled for Custom until we implement it properly. TODO\r
+                    this.ShowKeepAR = false;\r
 \r
                     // Ignore any of the users current settings and reset to source to make things easier.\r
                     this.Width = this.sourceResolution.Width;\r
@@ -835,7 +862,7 @@ namespace HandBrakeWPF.ViewModels
                         this.DisplayWidth = (this.Width * this.ParWidth / this.ParHeight);\r
                     }\r
 \r
-                    this.SetDisplaySize();\r
+                    //this.SetDisplaySize();\r
                     break;\r
             }\r
         }\r
index e7f5bbb35e3c7ad1483cd8a286719e7e11ebd21f..c9aa0d69b13f563d1feaccd9934b5fb4aa6bd2ea 100644 (file)
@@ -7,6 +7,7 @@
     <UserControl.Resources>\r
         <Converters:BooleanConverter x:Key="boolConverter" />\r
         <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />\r
+        <Converters:BooleanToHiddenVisibilityConverter x:Key="boolToVisHiddenConverter" />\r
         <Style TargetType="controls:NumberBox">\r
             <Setter Property="Height" Value="24" />\r
         </Style>\r
@@ -32,7 +33,9 @@
                 <Label Content="Height:" Grid.Row="1" Grid.Column="2" />\r
                 <controls:NumberBox Number="{Binding Height, Mode=TwoWay}" IsEnabled="{Binding HeightControlEnabled}" Modulus="{Binding SelectedModulus, Mode=OneWay}" \r
                                              Minimum="0" Grid.Row="1" Grid.Column="3" Width="60"  />\r
-                <CheckBox Content="Keep Aspect Ratio" IsChecked="{Binding MaintainAspectRatio}" VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                <CheckBox Content="Keep Aspect Ratio" IsChecked="{Binding MaintainAspectRatio}"\r
+                          Visibility="{Binding ShowKeepAR, Converter={StaticResource boolToVisHiddenConverter}}" \r
+                          VerticalAlignment="Center" Margin="5,0,0,0" />\r
             </StackPanel>\r
 \r
             <!-- Row 3-->\r