]> granicus.if.org Git - handbrake/commitdiff
WinGui: UI Tweaks and further fixes to Custom Anamorphic.
authorsr55 <sr55.hb@outlook.com>
Tue, 27 Nov 2012 17:07:56 +0000 (17:07 +0000)
committersr55 <sr55.hb@outlook.com>
Tue, 27 Nov 2012 17:07:56 +0000 (17:07 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5084 b64f7644-9d1e-0410-96f1-a4d463321fa5

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

index 471c49de53b923376beb5be63ac1d92947b4cb25..064342560113cc24ec2b4d8edc311ac580a9d71b 100644 (file)
@@ -953,6 +953,12 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         private void CustomAnamorphicAdjust()\r
         {\r
+            if (this.MaintainAspectRatio && this.DisplayWidth != 0)\r
+            {\r
+                this.ParWidth = this.DisplayWidth;\r
+                this.ParHeight = this.Width;\r
+            }\r
+\r
             this.SetDisplaySize();\r
         }\r
 \r
@@ -1094,6 +1100,12 @@ namespace HandBrakeWPF.ViewModels
                     this.SetDisplaySize();\r
                     break;\r
                 case Anamorphic.Custom:\r
+                    if (this.MaintainAspectRatio)\r
+                    {\r
+                        this.ParWidth = this.DisplayWidth;\r
+                        this.ParHeight = this.Width;\r
+                    }\r
+\r
                     this.SetDisplaySize();\r
                     break;\r
             }\r
index c7d2dc02dd4329b4f7aaef3223ea852cd3c90ba7..2f3213a7fa5a63811b7e6b9d9bbe558746ebc194 100644 (file)
@@ -8,7 +8,7 @@
     <UserControl.Resources>\r
         <Style TargetType="Button">\r
             <Setter Property="FontWeight" Value="Bold" />\r
-            <Setter Property="Padding" Value="5,0.5" />\r
+            <Setter Property="Padding" Value="5,1" />\r
             <Setter Property="FontSize" Value="11.5" />\r
             <Setter Property="VerticalAlignment" Value="Center" />\r
         </Style>\r
             <Setter Property="Margin" Value="0,0,5,0" />\r
         </Style>\r
 \r
+        <Style TargetType="TextBox">\r
+            <Setter Property="Padding" Value="5,2" />\r
+        </Style>\r
+\r
         <Style TargetType="CheckBox">\r
             <Setter Property="Margin" Value="0,0,0,5" />\r
         </Style>\r
@@ -88,7 +92,7 @@
                             <StackPanel Orientation="Horizontal" Margin="0,5,0,0">\r
                                 <CheckBox Content="Send file to:" VerticalAlignment="Center" IsChecked="{Binding SendFileAfterEncode}" />\r
                                 <TextBlock Margin="5,0,5,5" VerticalAlignment="Center" Text="{Binding SendFileTo}" />\r
-                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseSendFileTo]" Width="55"/>\r
+                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseSendFileTo]" />\r
                             </StackPanel>\r
 \r
                             <StackPanel Orientation="Horizontal" Margin="0,5,0,0">\r
                             <StackPanel Orientation="Horizontal">\r
                                 <TextBlock VerticalAlignment="Center" Text="Path:" />\r
                                 <TextBox Name="vlcPath" Text="{Binding VLCPath}"  Width="250" />\r
-                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseVlcPath]" Margin="5,0,0,0" Width="55"/>\r
+                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseVlcPath]" Margin="5,0,0,0" />\r
                             </StackPanel>\r
                             <TextBlock Margin="30,0,0,0" Text="This path is used for the video preview feature only." />\r
 \r
                             <StackPanel Orientation="Horizontal" Margin="0,5,0,0">\r
                                 <TextBlock VerticalAlignment="Center" Text="Default Path: " />\r
                                 <TextBox Name="autoNameOutputPath" Text="{Binding AutoNameDefaultPath}" Width="180" />\r
-                                <Button Content="Browse" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action BrowseAutoNamePath]" Width="55"/>\r
+                                <Button Content="Browse" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action BrowseAutoNamePath]" />\r
                             </StackPanel>\r
                             <TextBlock Text="Available Options: {source_path} or {source_folder_name} (Not Both)" />\r
 \r
index fa537e1787497697db3c778a8a50bd2b5f5f6afd..f8a09cf44c1c963a06042ba1afef09a567e3397f 100644 (file)
@@ -54,7 +54,7 @@
                           Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />\r
             </Grid>\r
             \r
-            <!-- Row 4-->\r
+            <!-- Custom Anamoprhic -->\r
             <Grid Margin="5,15,5,0" Visibility="{Binding ShowCustomAnamorphicControls, Converter={StaticResource boolToVisConverter}}">\r
                 <Grid.RowDefinitions>\r
                     <RowDefinition Height="Auto" />\r
                 <Label Content="PAR Height:" Grid.Row="5" Grid.Column="0" />\r
 \r
                 <NumericUpDown:NumericUpDown Width="60" Value="{Binding DisplayWidth, Mode=TwoWay}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />\r
-                <NumericUpDown:NumericUpDown Width="60" Value="{Binding ParWidth, Mode=TwoWay}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />\r
-                <NumericUpDown:NumericUpDown Width="60" Value="{Binding ParHeight, Mode=TwoWay}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />\r
+                <NumericUpDown:NumericUpDown Width="60" Value="{Binding ParWidth, Mode=TwoWay}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left"\r
+                                             IsEnabled="{Binding MaintainAspectRatio, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,0,5" />\r
+                <NumericUpDown:NumericUpDown Width="60" Value="{Binding ParHeight, Mode=TwoWay}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" \r
+                                             IsEnabled="{Binding MaintainAspectRatio, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,0,5" />\r
             </Grid>\r
             \r
             <!-- Row 5-->\r