]> granicus.if.org Git - handbrake/commitdiff
WinGui: Improve the layout of the Subtitle Tracks listbox items.
authorsr55 <sr55.hb@outlook.com>
Thu, 22 Aug 2013 19:03:26 +0000 (19:03 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 22 Aug 2013 19:03:26 +0000 (19:03 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5736 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Views/SubtitlesView.xaml

index 101d8ec44df10c50f4b1740baa21d239fc6bd4b8..2f607ecd3cc29eec8d2986b6fe6352ffe9f4ee88 100644 (file)
                                Margin="10,0,10,0"\r
                                Source="Images/Movies.png" />\r
 \r
-                        <!--  Settings  -->\r
-                        <Grid Grid.Column="1" HorizontalAlignment="Stretch">\r
+                        <!--  Standard Subtitle Settings  -->\r
+                        <Grid Grid.Column="1" HorizontalAlignment="Stretch" Margin="0,8,0,8"\r
+                              Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}">\r
                             <Grid.ColumnDefinitions>\r
                                 <ColumnDefinition Width="Auto" />\r
-                                <ColumnDefinition Width="*" MaxWidth="300" />\r
+                                <ColumnDefinition Width="Auto" />\r
                                 <ColumnDefinition Width="Auto" />\r
                                 <ColumnDefinition Width="Auto" />\r
                                 <ColumnDefinition Width="Auto" />\r
                             </Grid.ColumnDefinitions>\r
 \r
                             <Grid.RowDefinitions>\r
-                                <RowDefinition Height="28" />\r
-                                <RowDefinition Height="28" />\r
+                                <RowDefinition Height="Auto" />\r
                             </Grid.RowDefinitions>\r
 \r
-                            <!--  Row 1  -->\r
-\r
-                            <TextBlock Grid.Column="0"\r
-                                       VerticalAlignment="Center"\r
-                                       FontWeight="Bold"\r
-                                       Text="Source" />\r
-                            <ComboBox Grid.Column="1"\r
-                                      Height="22"\r
-                                      MaxWidth="300"\r
-                                      Margin="5,0,5,0"\r
-                                      HorizontalAlignment="Stretch"\r
-                                      ItemsSource="{Binding DataContext.SourceTracks,\r
-                                                            RelativeSource={RelativeSource FindAncestor,\r
-                                                                                           AncestorType={x:Type UserControl}}}"\r
-                                      SelectedItem="{Binding SourceTrack}"\r
-                                      Visibility="{Binding IsSrtSubtitle,\r
-                                                           Converter={StaticResource booleanToVisConverter},\r
-                                                           ConverterParameter=true}" />\r
-                            <TextBlock Grid.Column="1"\r
-                                       VerticalAlignment="Center"\r
-                                       Text="{Binding SrtFileName}"\r
-                                       Visibility="{Binding IsSrtSubtitle,\r
-                                                            Converter={StaticResource booleanToVisConverter},\r
-                                                            ConverterParameter=false}" />\r
+  \r
+                            <TextBlock Grid.Column="0" VerticalAlignment="Center" FontWeight="Bold" Text="Source" />\r
+                            <ComboBox Grid.Column="1" Height="22" Width="200" Margin="5,0,5,0" HorizontalAlignment="Stretch"\r
+                                      ItemsSource="{Binding DataContext.SourceTracks, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"\r
+                                      SelectedItem="{Binding SourceTrack}" />\r
 \r
-                            <TextBlock Grid.Column="2"\r
-                                       VerticalAlignment="Center"\r
-                                       FontWeight="Bold"\r
-                                       Text="Forced Only"\r
-                                       Visibility="{Binding IsSrtSubtitle,\r
-                                                            Converter={StaticResource booleanToVisConverter},\r
-                                                            ConverterParameter=true}" />\r
-                            <CheckBox Grid.Column="3"\r
-                                      Margin="5,0,5,0"\r
-                                      VerticalAlignment="Center"\r
-                                      IsEnabled="{Binding CanBeForced}"\r
-                                      IsChecked="{Binding Forced}"\r
-                                      Visibility="{Binding IsSrtSubtitle,\r
-                                                           Converter={StaticResource booleanToVisConverter},\r
-                                                           ConverterParameter=true}" />\r
-                            <TextBlock Grid.Column="4"\r
-                                       VerticalAlignment="Center"\r
-                                       FontWeight="Bold"\r
-                                       Text="Burn In"\r
-                                       Visibility="{Binding IsSrtSubtitle,\r
-                                                            Converter={StaticResource booleanToVisConverter},\r
-                                                            ConverterParameter=true}" />\r
-                            <CheckBox Grid.Column="5"\r
-                                      Margin="5,0,5,0"\r
-                                      VerticalAlignment="Center"\r
-                                      IsChecked="{Binding Burned}"\r
-                                      IsEnabled="{Binding CanBeBurned}"\r
-                                      Visibility="{Binding IsSrtSubtitle,\r
-                                                           Converter={StaticResource booleanToVisConverter},\r
-                                                           ConverterParameter=true}">\r
+                            <TextBlock Grid.Column="2" VerticalAlignment="Center" FontWeight="Bold" Text="Forced Only" Margin="5,0,0,0" />\r
+                            <CheckBox Grid.Column="3" Margin="5,0,5,0" VerticalAlignment="Center" IsEnabled="{Binding CanBeForced}" IsChecked="{Binding Forced}" />\r
+                            \r
+                            <TextBlock Grid.Column="4" VerticalAlignment="Center" FontWeight="Bold" Text="Burn In" />\r
+                            <CheckBox Grid.Column="5" Margin="5,0,5,0" VerticalAlignment="Center" IsChecked="{Binding Burned}" IsEnabled="{Binding CanBeBurned}">\r
                                 <i:Interaction.Triggers>\r
                                     <i:EventTrigger EventName="Click">\r
                                         <cal:ActionMessage MethodName="SelectBurnedInTrack">\r
                                     </i:EventTrigger>\r
                                 </i:Interaction.Triggers>\r
                             </CheckBox>\r
-                            <TextBlock Grid.Column="6"\r
-                                       VerticalAlignment="Center"\r
-                                       FontWeight="Bold"\r
-                                       Text="Default" />\r
-                            <CheckBox Grid.Column="7"\r
-                                      Margin="5,0,5,0"\r
-                                      VerticalAlignment="Center"\r
-                                      IsChecked="{Binding Default}">\r
+                            \r
+                            <TextBlock Grid.Column="6" VerticalAlignment="Center" FontWeight="Bold" Text="Default" />\r
+                            <CheckBox Grid.Column="7" Margin="5,0,5,0" VerticalAlignment="Center" IsChecked="{Binding Default}">\r
                                 <i:Interaction.Triggers>\r
                                     <i:EventTrigger EventName="Click">\r
                                         <cal:ActionMessage MethodName="SelectDefaultTrack">\r
                                         </cal:ActionMessage>\r
                                     </i:EventTrigger>\r
                                 </i:Interaction.Triggers>\r
-                            </CheckBox>\r
+                            </CheckBox>        \r
+                        </Grid>\r
+\r
 \r
-                            <!--  Row 2  -->\r
-                            <TextBlock Grid.Row="1"\r
-                                       Grid.Column="0"\r
-                                       VerticalAlignment="Center"\r
-                                       FontWeight="Bold"\r
-                                       Text="Language" />\r
-                            <ComboBox Grid.Row="1"\r
-                                      Grid.Column="1"\r
-                                      Height="22"\r
-                                      MaxWidth="300"\r
-                                      Margin="5,0,5,0"\r
-                                      HorizontalAlignment="Stretch"\r
-                                      IsEnabled="{Binding IsSrtSubtitle}"\r
-                                      ItemsSource="{Binding DataContext.Langauges,\r
-                                                            RelativeSource={RelativeSource FindAncestor,\r
-                                                                                           AncestorType={x:Type UserControl}}}"\r
+                        <!--  SRT Subtitle Settings  -->\r
+                        <Grid Grid.Column="1" HorizontalAlignment="Stretch" Margin="0,8,0,8"\r
+                              Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=false}" >\r
+                            <Grid.ColumnDefinitions>\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                                <ColumnDefinition Width="Auto" />\r
+                            </Grid.ColumnDefinitions>\r
+\r
+                            <Grid.RowDefinitions>\r
+                                <RowDefinition Height="Auto" />\r
+                            </Grid.RowDefinitions>\r
+\r
+                            <!--  Row 1  -->\r
+                            <TextBlock Grid.Column="0" VerticalAlignment="Center" FontWeight="Bold" Text="Source" />\r
+                            <TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding SrtFileName}" Margin="5,0,5,0" Width="80" TextWrapping="NoWrap" TextTrimming="WordEllipsis"\r
+                                       Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=false}" />\r
+\r
+                            <TextBlock  Grid.Column="2" VerticalAlignment="Center" FontWeight="Bold" Text="Lang" />\r
+                            <ComboBox  Grid.Column="3" Height="22" Width="100" Margin="5,0,5,0" HorizontalAlignment="Stretch" IsEnabled="{Binding IsSrtSubtitle}"\r
+                                      ItemsSource="{Binding DataContext.Langauges, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"\r
                                       SelectedItem="{Binding SrtLang}" />\r
-                            <TextBlock Grid.Row="1"\r
-                                       Grid.Column="2"\r
-                                       VerticalAlignment="Center"\r
-                                       FontWeight="Bold"\r
-                                       Text="Char Code" />\r
-                            <ComboBox Grid.Row="1"\r
-                                      Grid.Column="3"\r
-                                      Width="100"\r
-                                      Height="22"\r
-                                      Margin="5,0,5,0"\r
-                                      IsEnabled="{Binding IsSrtSubtitle}"\r
-                                      ItemsSource="{Binding DataContext.CharacterCodes,\r
-                                                            RelativeSource={RelativeSource FindAncestor,\r
-                                                                                           AncestorType={x:Type UserControl}}}"\r
+                            \r
+                            <TextBlock  Grid.Column="4" VerticalAlignment="Center" FontWeight="Bold" Text="Char Code" />\r
+                            <ComboBox Grid.Column="5" Width="75" Height="22" Margin="5,0,5,0" IsEnabled="{Binding IsSrtSubtitle}"\r
+                                      ItemsSource="{Binding DataContext.CharacterCodes, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"\r
                                       SelectedItem="{Binding SrtCharCode}" />\r
-                            <TextBlock Grid.Row="1"\r
-                                       Grid.Column="4"\r
-                                       VerticalAlignment="Center"\r
-                                       FontWeight="Bold"\r
-                                       Text="Offset (ms)" />\r
-\r
-                            <controls:NumberBox Grid.Row="1" Grid.Column="5" Width="65" Height="24" Margin="5,0,5,0"\r
-                                            Minimum="-900000" Maximum="900000" IsEnabled="{Binding IsSrtSubtitle}"\r
-                                            Number="{Binding SrtOffset, Mode=TwoWay}" />\r
                             \r
+                            <TextBlock Grid.Column="6" VerticalAlignment="Center" FontWeight="Bold" Text="Offset (ms)" />\r
+                            <controls:NumberBox Grid.Column="7" Width="65" Height="24" Margin="5,0,5,0" Minimum="-900000" Maximum="900000" \r
+                                                IsEnabled="{Binding IsSrtSubtitle}" Number="{Binding SrtOffset, Mode=TwoWay}" />\r
+\r
+                            <TextBlock Grid.Column="8" VerticalAlignment="Center" FontWeight="Bold" Text="Default" />\r
+                            <CheckBox Grid.Column="9" Margin="5,0,5,0" VerticalAlignment="Center" IsChecked="{Binding Default}">\r
+                                <i:Interaction.Triggers>\r
+                                    <i:EventTrigger EventName="Click">\r
+                                        <cal:ActionMessage MethodName="SelectDefaultTrack">\r
+                                            <cal:Parameter Value="{Binding}" />\r
+                                        </cal:ActionMessage>\r
+                                    </i:EventTrigger>\r
+                                </i:Interaction.Triggers>\r
+                            </CheckBox>\r
+\r
                         </Grid>\r
 \r
                         <!--  Delete  -->\r