summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-06-14 09:59:24 +0000
committersr55 <[email protected]>2012-06-14 09:59:24 +0000
commited72f7ae22fd5b3aae3958704c09b2ecbabd4a0c (patch)
tree9f3da3fab144395666fab79232f1bbef3323e864 /win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
parent9be558d961413ee242da53dfc18a7c819b0faf41 (diff)
WinGui: Some layout tweaks by beta-tester
- disabling sizing on windows, where sizing makes no sense; - limit sizing on windows, where sizing in a wrong directions makes problems; - make controls full sizable, where the readability/information will benefit from; - all windows appears now in ScreenCenter; git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4730 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/SubtitlesView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesView.xaml205
1 files changed, 152 insertions, 53 deletions
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
index a1b32527d..93f0ba7c5 100644
--- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
@@ -1,16 +1,20 @@
<UserControl x:Class="HandBrakeWPF.Views.SubtitlesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
+ xmlns:cal="http://www.caliburnproject.org"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
- xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
- xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" mc:Ignorable="d">
+ d:DesignHeight="153"
+ d:DesignWidth="319"
+ mc:Ignorable="d">
<UserControl.Resources>
<Converters:BooleanToVisibilityConverter x:Key="booleanToVisConverter" />
</UserControl.Resources>
-
+
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -18,7 +22,10 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
- <TextBlock Text="Subtitles" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
+ <TextBlock Grid.Row="0"
+ Margin="10,5,0,0"
+ FontWeight="Bold"
+ Text="Subtitles" />
<Grid Grid.Row="1" Margin="10,5,10,0">
<Grid.ColumnDefinitions>
@@ -26,17 +33,29 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Button Content="Add" Name="AddTrack" Grid.Column="0" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Add]" />
- <Button Content="Import SRT" Grid.Column="2" Width="85" cal:Message.Attach="[Event Click] = [Action Import]" />
+ <Button Name="AddTrack"
+ Grid.Column="0"
+ Width="75"
+ Margin="0,0,10,0"
+ cal:Message.Attach="[Event Click] = [Action Add]"
+ Content="Add" />
+ <Button Grid.Column="2"
+ Width="85"
+ cal:Message.Attach="[Event Click] = [Action Import]"
+ Content="Import SRT" />
</Grid>
- <ListBox Grid.Row="2" ItemsSource="{Binding Task.SubtitleTracks}"
- SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10"
- dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
- dd:DragDrop.DropHandler="{Binding}">
+ <ListBox Grid.Row="2"
+ Margin="10,10,10,10"
+ Background="LightGray"
+ dd:DragDrop.DropHandler="{Binding}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"
+ ItemsSource="{Binding Task.SubtitleTracks}"
+ SelectionMode="Extended">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
- <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Background" Value="WhiteSmoke" />
<Setter Property="Margin" Value="0,0,0,1" />
</Style>
@@ -52,14 +71,18 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <!-- Marker -->
- <Image Source="Images/Movies.png" Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" />
+ <!-- Marker -->
+ <Image Grid.Column="0"
+ Width="16"
+ Height="16"
+ Margin="10,0,10,0"
+ Source="Images/Movies.png" />
- <!-- Settings -->
+ <!-- Settings -->
<Grid Grid.Column="1" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" MaxWidth="300" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
@@ -76,23 +99,59 @@
<RowDefinition Height="28" />
</Grid.RowDefinitions>
- <!-- Row 1-->
-
- <TextBlock Text="Source" FontWeight="Bold" Grid.Column="0" VerticalAlignment="Center" />
- <ComboBox Width="120" ItemsSource="{Binding DataContext.SourceTracks, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding SourceTrack}" Grid.Column="1" Margin="5,0,5,0" Height="22"
- Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}"/>
- <TextBlock Text="{Binding SrtFileName}" Grid.Column="1" VerticalAlignment="Center"
- Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=false}" />
-
- <TextBlock Text="Forced Only" FontWeight="Bold" Grid.Column="2" VerticalAlignment="Center"
- Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}" />
- <CheckBox Grid.Column="3" IsChecked="{Binding Forced}" VerticalAlignment="Center" Margin="5,0,5,0"
- Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}" />
- <TextBlock Text="Burn In" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center"
- Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}"/>
- <CheckBox Grid.Column="5" IsChecked="{Binding Burned}" VerticalAlignment="Center" Margin="5,0,5,0"
- Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}">
+ <!-- Row 1 -->
+
+ <TextBlock Grid.Column="0"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Source" />
+ <ComboBox Grid.Column="1"
+ Height="22"
+ MaxWidth="300"
+ Margin="5,0,5,0"
+ HorizontalAlignment="Stretch"
+ ItemsSource="{Binding DataContext.SourceTracks,
+ RelativeSource={RelativeSource FindAncestor,
+ AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding SourceTrack}"
+ Visibility="{Binding IsSrtSubtitle,
+ Converter={StaticResource booleanToVisConverter},
+ ConverterParameter=true}" />
+ <TextBlock Grid.Column="1"
+ VerticalAlignment="Center"
+ Text="{Binding SrtFileName}"
+ Visibility="{Binding IsSrtSubtitle,
+ Converter={StaticResource booleanToVisConverter},
+ ConverterParameter=false}" />
+
+ <TextBlock Grid.Column="2"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Forced Only"
+ Visibility="{Binding IsSrtSubtitle,
+ Converter={StaticResource booleanToVisConverter},
+ ConverterParameter=true}" />
+ <CheckBox Grid.Column="3"
+ Margin="5,0,5,0"
+ VerticalAlignment="Center"
+ IsChecked="{Binding Forced}"
+ Visibility="{Binding IsSrtSubtitle,
+ Converter={StaticResource booleanToVisConverter},
+ ConverterParameter=true}" />
+ <TextBlock Grid.Column="4"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Burn In"
+ Visibility="{Binding IsSrtSubtitle,
+ Converter={StaticResource booleanToVisConverter},
+ ConverterParameter=true}" />
+ <CheckBox Grid.Column="5"
+ Margin="5,0,5,0"
+ VerticalAlignment="Center"
+ IsChecked="{Binding Burned}"
+ Visibility="{Binding IsSrtSubtitle,
+ Converter={StaticResource booleanToVisConverter},
+ ConverterParameter=true}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="SelectBurnedInTrack">
@@ -101,8 +160,14 @@
</i:EventTrigger>
</i:Interaction.Triggers>
</CheckBox>
- <TextBlock Text="Default" FontWeight="Bold" Grid.Column="6" VerticalAlignment="Center" />
- <CheckBox Grid.Column="7" IsChecked="{Binding Default}" VerticalAlignment="Center" Margin="5,0,5,0">
+ <TextBlock Grid.Column="6"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Default" />
+ <CheckBox Grid.Column="7"
+ Margin="5,0,5,0"
+ VerticalAlignment="Center"
+ IsChecked="{Binding Default}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="SelectDefaultTrack">
@@ -112,25 +177,59 @@
</i:Interaction.Triggers>
</CheckBox>
- <!-- Row 2-->
- <TextBlock Text="Language" FontWeight="Bold" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center"/>
- <ComboBox Width="120" Grid.Column="1"
- ItemsSource="{Binding DataContext.Langauges, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding SrtLang}" Margin="5,0,5,0" Grid.Row="1" Height="22"
- IsEnabled="{Binding IsSrtSubtitle}"/>
- <TextBlock Text="Char Code" FontWeight="Bold" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
- <ComboBox Width="100" Grid.Column="3"
- ItemsSource="{Binding DataContext.CharacterCodes, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding SrtCharCode}" Grid.Row="1" Margin="5,0,5,0" Height="22"
- IsEnabled="{Binding IsSrtSubtitle}" />
- <TextBlock Text="Offset (ms)" FontWeight="Bold" Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"/>
- <NumericUpDown:NumericUpDown Width="65" Value="{Binding SrtOffset}" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Left"
- IsEnabled="{Binding IsSrtSubtitle}" Margin="5,0,5,0" />
+ <!-- Row 2 -->
+ <TextBlock Grid.Row="1"
+ Grid.Column="0"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Language" />
+ <ComboBox Grid.Row="1"
+ Grid.Column="1"
+ Height="22"
+ MaxWidth="300"
+ Margin="5,0,5,0"
+ HorizontalAlignment="Stretch"
+ IsEnabled="{Binding IsSrtSubtitle}"
+ ItemsSource="{Binding DataContext.Langauges,
+ RelativeSource={RelativeSource FindAncestor,
+ AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding SrtLang}" />
+ <TextBlock Grid.Row="1"
+ Grid.Column="2"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Char Code" />
+ <ComboBox Grid.Row="1"
+ Grid.Column="3"
+ Width="100"
+ Height="22"
+ Margin="5,0,5,0"
+ IsEnabled="{Binding IsSrtSubtitle}"
+ ItemsSource="{Binding DataContext.CharacterCodes,
+ RelativeSource={RelativeSource FindAncestor,
+ AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding SrtCharCode}" />
+ <TextBlock Grid.Row="1"
+ Grid.Column="4"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Offset (ms)" />
+ <NumericUpDown:NumericUpDown Grid.Row="1"
+ Grid.Column="5"
+ Width="65"
+ Margin="5,0,5,0"
+ HorizontalAlignment="Left"
+ IsEnabled="{Binding IsSrtSubtitle}"
+ Value="{Binding SrtOffset}" />
</Grid>
- <!-- Delete -->
- <Image Source="Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
+ <!-- Delete -->
+ <Image Grid.Column="2"
+ Width="16"
+ Height="16"
+ Margin="10,0,10,0"
+ Source="Images/delete.png">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
<cal:ActionMessage MethodName="Remove">
@@ -147,6 +246,6 @@
</ListBox.ItemTemplate>
</ListBox>
-
+
</Grid>
</UserControl>