summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-03-29 15:57:53 +0000
committersr55 <[email protected]>2015-03-29 15:57:53 +0000
commit168ce686fd837de7fbf20266df31af2ac00c8db1 (patch)
tree1feb3e16046babb4bee15b7554a04ca383e13206 /win/CS/HandBrakeWPF/Views
parent476eb6ccaa4e655c43d85d8111f27451aa0a8f8f (diff)
WinGui: Add TrueHD, Flac and EAC3 Passthru, and EAC3 encoder options. Fixed No Audio Behaviour. Misc other experimental UX/UI code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7027 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml163
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml20
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml7
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml14
-rw-r--r--win/CS/HandBrakeWPF/Views/VideoView.xaml4
5 files changed, 199 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
new file mode 100644
index 000000000..876485d26
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
@@ -0,0 +1,163 @@
+<UserControl x:Class="HandBrakeWPF.Views.AudioDefaultsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:Audio="clr-namespace:HandBrakeWPF.Converters.Audio"
+ xmlns:cal="http://www.caliburnproject.org"
+ xmlns:Conveters="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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
+ d:DesignHeight="400"
+ d:DesignWidth="720"
+ Width="600"
+ Height="360"
+ mc:Ignorable="d"
+ Background="{Binding Path=Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
+ BorderThickness="1" BorderBrush="DarkGray"
+ x:Name="audioTab">
+
+ <UserControl.Resources>
+ <Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Audio:AudioEncoderConverter x:Key="audioEncoderConverter" />
+ <Audio:AudioBehaviourConverter x:Key="audioBehaviourConverter" />
+ </UserControl.Resources>
+
+ <Grid >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+
+ <!-- Row 0 -->
+ <TextBlock Grid.Row="0"
+ Margin="10,5,0,0"
+ FontWeight="Bold"
+ VerticalAlignment="Top"
+ Text="AudioDefaults" />
+
+ <!-- Row 2 -->
+ <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10,0,10,0"
+ Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}">
+
+ <Grid Margin="5,0,0,0" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Audio -->
+ <TextBlock Text="Track Selection Behaviour:" Grid.Column="0" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="autoAudioMode" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left"
+ ItemsSource="{Binding AudioBehaviourModeList, Converter={StaticResource audioBehaviourConverter}}"
+ SelectedItem="{Binding AudioBehaviours.SelectedBehaviour, Converter={StaticResource audioBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
+ </Grid>
+
+ <TextBlock Text="Choose Languages:" Margin="5,10,0,0" />
+
+ <Grid Margin="20,5,0,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Horizontal">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Vertical" Grid.Column="0">
+ <TextBlock Text="Available Languages:" Margin="0,0,0,5"/>
+ <ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}"
+ SelectionMode="Extended" Width="140" Height="120" />
+ </StackPanel>
+
+ <DockPanel Grid.Column="1" Margin="10,0,10,0">
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <Button Content="Move Right" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" MaxWidth="90" />
+ <Button Content="Move Left" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" MaxWidth="90" />
+ <Button Content="Clear" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
+ </StackPanel>
+ </DockPanel>
+
+ <StackPanel Orientation="Vertical" Grid.Column="2">
+ <TextBlock Text="Chosen Languages:" Margin="0,0,0,5"/>
+ <ListBox Name="selectedLangauges" ItemsSource="{Binding AudioBehaviours.SelectedLangauges}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}"
+ SelectionMode="Extended" Width="140" Height="120"
+ dd:DragDrop.DropHandler="{Binding}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"/>
+ </StackPanel>
+ </Grid>
+ </StackPanel>
+ </Grid>
+
+ <TextBlock Text="'Auto Passthru' Behaviour:" FontWeight="Bold" Margin="0,10,0,5" />
+ <StackPanel Margin="10,5,0,0"
+ Orientation="Vertical">
+ <TextBlock Margin="5,0,5,0" Text="When 'Auto Passthru' is selected as the audio codec." VerticalAlignment="Center" />
+ <TextBlock Margin="5,0,5,0" Text="Allow passthru of:" VerticalAlignment="Center" />
+ </StackPanel>
+ <StackPanel Margin="15,5,0,0"
+ Orientation="Horizontal">
+ <CheckBox Margin="0,0,5,0"
+ Content="MP3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowMP3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="AAC" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAACPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="AC3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAC3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="DTS" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="DTSHD" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSHDPass}" />
+
+ <TextBlock Margin="15,0,5,0" Text="Otherwise use fallback encoder:" />
+
+ <ComboBox VerticalAlignment="Center" Width="120" Height="22" Margin="10,0,5,0">
+ <ComboBox.SelectedItem>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}">
+ <Binding Path="Task.AllowedPassthruOptions.AudioEncoderFallback" />
+ </MultiBinding>
+ </ComboBox.SelectedItem>
+ <ComboBox.ItemsSource>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}" ConverterParameter="True">
+ <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
+ <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
+ </MultiBinding>
+ </ComboBox.ItemsSource>
+ </ComboBox>
+
+ </StackPanel>
+
+ </StackPanel>
+
+ <Button Content="Done" cal:Message.Attach="[Event Click] = [Action Close]" Grid.Row="3" HorizontalAlignment="Center"
+ Margin="0,5,0,5" Padding="8,2" />
+ </Grid>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index 2c71d0bb1..ce9ebd1e0 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -11,8 +11,8 @@
xmlns:splitButton="clr-namespace:HandBrakeWPF.Controls.SplitButton"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
- d:DesignHeight="350"
- d:DesignWidth="616"
+ d:DesignHeight="400"
+ d:DesignWidth="750"
mc:Ignorable="d"
x:Name="audioTab">
@@ -81,6 +81,11 @@
cal:Message.Attach="[Event Click] = [Action ShowAudioDefaults]"
Content="{Binding SwitchDisplayTitle}" />
+ <Button MinWidth="65"
+ Margin="0,0,10,0"
+ cal:Message.Attach="[Event Click] = [Action ReloadDefaults]"
+ Content="Reload Defaults" />
+
</StackPanel>
</Grid>
@@ -362,12 +367,21 @@
Content="AC3" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAC3Pass}" />
<CheckBox Margin="0,0,5,0"
+ Content="E-AC3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowEAC3Pass}" />
+ <CheckBox Margin="0,0,5,0"
Content="DTS" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSPass}" />
<CheckBox Margin="0,0,5,0"
Content="DTSHD" VerticalAlignment="Center"
IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSHDPass}" />
-
+ <CheckBox Margin="0,0,5,0"
+ Content="TrueHD" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowTrueHDPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="FLAC" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowFlacPass}" />
+
<TextBlock Margin="15,0,5,0" Text="Otherwise use fallback encoder:" />
<ComboBox VerticalAlignment="Center" Width="100" Height="22" Margin="10,0,5,0">
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index ad875db87..44a46b195 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -641,9 +641,14 @@
<!-- Source Selection-->
<Controls:SourceSelection Grid.Row="1" MinWidth="300" HorizontalAlignment="Left" VerticalAlignment="Stretch" BorderThickness="1" BorderBrush="DarkGray"
- Visibility="{Binding ShowSourceSelection, Converter={StaticResource boolToVisConverter}}"
+ Visibility="{Binding ShowSourceSelection, Converter={StaticResource boolToVisConverter}}" Panel.ZIndex="1"
/>
+
+ <DockPanel Background="Black" Opacity="0.40" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Panel.ZIndex="0"
+ Grid.Row="1"
+ Visibility="{Binding ShowSourceSelection, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+
<!-- StatusPanel -->
<Controls:StatusPanel x:Name="loadingPanel"
Grid.Row="1"
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml
index 9f735ec61..063678da5 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml
@@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
- xmlns:views="clr-namespace:HandBrakeWPF.Views"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:cal="http://www.caliburnproject.org"
Title="{Data:Binding Path=WindowTitle}"
@@ -32,8 +31,17 @@
</i:Interaction.Triggers>
<Grid>
- <ContentControl x:Name="MainViewModel" Visibility="{Binding ShowMainWindow, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
- <ContentControl x:Name="OptionsViewModel" Visibility="{Binding ShowOptions, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+ <ContentControl x:Name="MainViewModel" Panel.ZIndex="0" Visibility="{Binding ShowMainWindow, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"
+ IsEnabled="{Binding IsMainPanelEnabled}" />
+ <ContentControl x:Name="OptionsViewModel" Panel.ZIndex="0" Visibility="{Binding ShowOptions, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"
+ IsEnabled="{Binding IsMainPanelEnabled}" />
+
+ <DockPanel Background="Black" Opacity="0.60" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Panel.ZIndex="1"
+ Visibility="{Binding ShowOverlayPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+
+ <ContentControl x:Name="OverlayPanelViewModel" Visibility="{Binding ShowOverlayPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"
+ VerticalAlignment="Center" HorizontalAlignment="Center" Panel.ZIndex="2" MinWidth="900" MinHeight="675" />
+
</Grid>
</Window>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml
index 9fa047575..db7f0e619 100644
--- a/win/CS/HandBrakeWPF/Views/VideoView.xaml
+++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml
@@ -170,12 +170,12 @@
<!-- Row 2-->
- <TextBlock Text="H.264 Profile:" Grid.Row="3" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" Visibility="{Binding DisplayOptimiseOptions, Converter={StaticResource boolToVisConverter}}"/>
+ <TextBlock Text="Encoder Profile:" Grid.Row="3" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" Visibility="{Binding DisplayOptimiseOptions, Converter={StaticResource boolToVisConverter}}"/>
<ComboBox Width="100" Grid.Row="3" Grid.Column="1" Margin="5,10,5,0" Height="22" VerticalAlignment="Center" Visibility="{Binding DisplayOptimiseOptions, Converter={StaticResource boolToVisConverter}}"
ItemsSource="{Binding VideoProfiles}" DisplayMemberPath="DisplayName" SelectedItem="{Binding VideoProfile}"
Style="{StaticResource LongToolTipHolder}" ToolTip="{x:Static Properties:Resources.Video_EncoderProfile}" />
- <TextBlock Text="H.264 Level:" Grid.Row="3" Grid.Column="2" Margin="10,10,0,0" VerticalAlignment="Center" Visibility="{Binding DisplayLevelControl, Converter={StaticResource boolToVisConverter}}" />
+ <TextBlock Text="Encoder Level:" Grid.Row="3" Grid.Column="2" Margin="10,10,0,0" VerticalAlignment="Center" Visibility="{Binding DisplayLevelControl, Converter={StaticResource boolToVisConverter}}" />
<ComboBox Width="100" Grid.Row="3" Grid.Column="3" Margin="5,10,5,0" Height="22" VerticalAlignment="Center" Visibility="{Binding DisplayLevelControl, Converter={StaticResource boolToVisConverter}}"
ItemsSource="{Binding VideoLevels}" DisplayMemberPath="DisplayName" SelectedItem="{Binding VideoLevel}"
Style="{StaticResource LongToolTipHolder}" ToolTip="{x:Static Properties:Resources.Video_EncoderLevel}"/>