summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-02-11 23:13:12 +0000
committersr55 <[email protected]>2012-02-11 23:13:12 +0000
commitc3077f8c91764b1e5258b802a17d086c6afc02af (patch)
treeabce8ba7664b3688863c3418b2625782d2cad15c /win/CS/HandBrakeWPF/Views
parent1d504d557ecc008e3f7924df4181f07b793448fc (diff)
WinGui: (WPF) Initial wire-up work on the Picture settings panel and setup the auto-nameing feature for the destination path.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4445 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml73
1 files changed, 53 insertions, 20 deletions
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
index 5ebe36b33..d9ed6cef2 100644
--- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
@@ -6,6 +6,7 @@
<UserControl.Resources>
<Converters:BooleanConverter x:Key="boolConverter" />
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
</UserControl.Resources>
<StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
@@ -16,16 +17,18 @@
<!-- Row 1-->
<StackPanel Orientation="Horizontal" Margin="5,0,5,0">
- <Label Content="Source" Grid.Row="0" Grid.Column="0" />
+ <Label Content="Source:" Grid.Row="0" Grid.Column="0" />
<Label Content="{Binding SourceInfo}" Name="sourceResolution" Grid.Row="0" Grid.Column="1" />
</StackPanel>
<!-- Row 2-->
<StackPanel Orientation="Horizontal" Margin="5,0,5,0">
<Label Content="Width:" Grid.Row="1" Grid.Column="0" />
- <NumericUpDown:NumericUpDown Value="{Binding Width}" Minimum="0" Grid.Row="1" Grid.Column="1" Width="45" />
+ <NumericUpDown:NumericUpDown Value="{Binding Width, Mode=TwoWay}" IsEnabled="{Binding WidthControlEnabled}" SmallChange="{Binding SelectedModulus, Mode=OneWay}"
+ Minimum="0" Grid.Row="1" Grid.Column="1" Width="60" />
<Label Content="Height:" Grid.Row="1" Grid.Column="2" />
- <NumericUpDown:NumericUpDown Value="{Binding Height}" Minimum="0" Grid.Row="1" Grid.Column="3" Width="45" />
+ <NumericUpDown:NumericUpDown Value="{Binding Height, Mode=TwoWay}" IsEnabled="{Binding HeightControlEnabled}" SmallChange="{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" />
</StackPanel>
@@ -34,10 +37,6 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -47,21 +46,51 @@
<Label Content="Anamorphic:" Grid.Row="0" Grid.Column="0" />
<Label Content="Modulus:" Grid.Row="1" Grid.Column="0" />
- <Label Content="Display Width:" Grid.Row="2" Grid.Column="0" />
- <Label Content="PAR Width:" Grid.Row="3" Grid.Column="0" />
- <Label Content="PAR Height:" Grid.Row="4" Grid.Column="0" />
- <Label Content="Display Size:" Grid.Row="5" Grid.Column="0" />
<ComboBox Width="110" Grid.Row="0" ItemsSource="{Binding AnamorphicModes}" SelectedItem="{Binding SelectedAnamorphicMode}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
<ComboBox Width="110" Grid.Row="1" ItemsSource="{Binding ModulusValues}" SelectedItem="{Binding SelectedModulus}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding DisplayWidth}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding ParWidth}" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding ParHeight}" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <Label Content="{Binding DisplaySize}" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
</Grid>
- </StackPanel>
+
+ <!-- Row 4-->
+ <Grid Margin="5,15,5,0" Visibility="{Binding ShowCustomAnamorphicControls, Converter={StaticResource boolToVisConverter}}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <Label Content="Display Width:" Grid.Row="0" Grid.Column="0" />
+ <Label Content="PAR Width:" Grid.Row="1" Grid.Column="0" />
+ <Label Content="PAR Height:" Grid.Row="5" Grid.Column="0" />
+
+ <NumericUpDown:NumericUpDown Width="60" Value="{Binding DisplayWidth, Mode=TwoWay}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="60" Value="{Binding ParWidth, Mode=TwoWay}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="60" Value="{Binding ParHeight, Mode=TwoWay}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ </Grid>
+
+ <!-- Row 5-->
+ <Grid Margin="5,15,5,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Label Content="Display Size:" Grid.Row="0" Grid.Column="0" />
+
+ <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ </Grid>
+ </StackPanel>
+ <!-- Crop Panel -->
<StackPanel Name="CropPanel" Margin="50,0,0,0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Label Content="Cropping" FontWeight="Bold" />
<RadioButton Content="Automatic" IsChecked="{Binding IsCustomCrop, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="10,0,0,0"/>
@@ -89,10 +118,14 @@
<Label Content="Left" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" />
<Label Content="Right" Grid.Row="2" Grid.Column="4" HorizontalAlignment="Center" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropTop}" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropBottom}" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropLeft}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropRight}" Grid.Row="2" Grid.Column="3" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropTop, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="1" Grid.Column="2"
+ HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropBottom, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="3" Grid.Column="2"
+ HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropLeft, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="2" Grid.Column="1"
+ HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropRight, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="2" Grid.Column="3"
+ HorizontalAlignment="Left" Margin="0,0,0,5" />
</Grid>