diff options
author | sr55 <[email protected]> | 2015-01-17 23:03:53 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-01-17 23:03:53 +0000 |
commit | 9250daa1b69db695007f2b43ae19ec2d66112ef9 (patch) | |
tree | 1bf8b813f10f78f6155ba367d23503bdcd03554a /win/CS/HandBrakeWPF/Views | |
parent | 7f7da739dc4485771416931aab652b6651737d69 (diff) |
WinGui: Combine the Still and Live previews into a single window in the same style as the Mac and Linux GUI's
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6765 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PreviewView.xaml | 89 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs | 27 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml | 55 |
4 files changed, 49 insertions, 125 deletions
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml index 23f9885c7..9285cba82 100644 --- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml +++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml @@ -168,9 +168,6 @@ <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="0,0,0,5"
Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />
-
- <Button Content="Preview" Grid.Row="1" Margin="5,0,0,0"
- cal:Message.Attach="[Event Click] = [Action PreviewImage]" HorizontalAlignment="Left" />
</Grid>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/PreviewView.xaml b/win/CS/HandBrakeWPF/Views/PreviewView.xaml deleted file mode 100644 index c38a5dc2c..000000000 --- a/win/CS/HandBrakeWPF/Views/PreviewView.xaml +++ /dev/null @@ -1,89 +0,0 @@ -<Window x:Class="HandBrakeWPF.Views.PreviewView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cal="http://www.caliburnproject.org"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- Title="{Binding Title}"
- Width="390"
- Style="{StaticResource windowStyle}"
- ResizeMode="NoResize"
- SizeToContent="Height"
- WindowStartupLocation="CenterScreen"
- TextOptions.TextFormattingMode="Display"
- mc:Ignorable="d">
-
- <Window.Resources>
- <Style TargetType="Button">
- <Setter Property="FontWeight" Value="Bold" />
- <Setter Property="Padding" Value="5,1" />
- <Setter Property="FontSize" Value="11.5" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
- </Window.Resources>
-
- <StackPanel Orientation="Vertical">
-
- <StackPanel Height="34"
- Margin="0,0,0,10"
- Orientation="Horizontal">
-
- <StackPanel.Style>
- <Style TargetType="StackPanel">
- <Style.Triggers>
- <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
- <Setter Property="Background" Value="White" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </StackPanel.Style>
-
- <Image Width="32"
- Height="32"
- Margin="10,0,5,0"
- VerticalAlignment="Center"
- Source="Images/picture_small.png" />
- <StackPanel VerticalAlignment="Center" Orientation="Vertical">
- <TextBlock FontWeight="Bold" Text="Create a video preview" />
- </StackPanel>
- </StackPanel>
-
- <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
- <TextBlock Margin="0,0,5,0"
- VerticalAlignment="Center"
- Text="Start at Preview:" />
- <ComboBox Width="60"
- ItemsSource="{Binding StartPoints}"
- SelectedItem="{Binding StartAt}" />
-
- <TextBlock Margin="10,0,5,0"
- VerticalAlignment="Center"
- Text="Duration:" />
- <ComboBox Width="60"
- ItemsSource="{Binding AvailableDurations}"
- SelectedItem="{Binding Duration}" />
- </StackPanel>
-
- <Grid Margin="10,10,10,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" MinWidth="50" />
- </Grid.ColumnDefinitions>
- <ProgressBar MinHeight="22" Maximum="100" Minimum="0" Value="{Binding PercentageValue}" Grid.Column="0" />
- <TextBlock Margin="5,0,0,0" Text="{Binding Percentage}" Grid.Column="1" />
- </Grid>
-
- <StackPanel Margin="10,10,0,10" Orientation="Horizontal">
- <CheckBox VerticalAlignment="Center"
- Content="Use system default player"
- IsChecked="{Binding UseSystemDefaultPlayer}" />
- <Button Margin="10,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- cal:Message.Attach="[Event Click] = [Action Play]"
- Content="Play"
- IsDefault="True"
- Padding="8,2" />
- </StackPanel>
- </StackPanel>
-</Window>
diff --git a/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs b/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs deleted file mode 100644 index a8203245a..000000000 --- a/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="PreviewView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Interaction logic for VideoView.xaml
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Views
-{
- using System.Windows;
-
- /// <summary>
- /// Interaction logic for VideoView.xaml
- /// </summary>
- public partial class PreviewView : Window
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="PreviewView"/> class.
- /// </summary>
- public PreviewView()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml b/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml index df437bd77..64783a087 100644 --- a/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml +++ b/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml @@ -10,7 +10,7 @@ WindowStartupLocation="CenterScreen"
cal:Message.Attach="[Event SizeChanged] = [Action PreviewSizeChanged($eventArgs)]"
Title="{Binding Title}">
-
+
<Window.Resources>
<converters:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
</Window.Resources>
@@ -21,12 +21,55 @@ </StackPanel>
<Image Source="{Binding PreviewImage}" MaxWidth="{Binding Width}" MaxHeight="{Binding Height}" />
- <Slider Maximum="{Binding TotalPreviews}" Minimum="0"
+
+
+ <Border BorderBrush="WhiteSmoke" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8" Padding="8"
+ VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="20" MinWidth="400" Background="Black" Opacity="0.70">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions></Grid.ColumnDefinitions>
+ <Slider Maximum="{Binding TotalPreviews}" Minimum="0"
Value="{Binding SelectedPreviewImage}"
- VerticalAlignment="Bottom"
- HorizontalAlignment="Center"
- Margin="0,0,0,20" Width="150"
- Background="Transparent"
+ VerticalAlignment="Center"
+ HorizontalAlignment="Stretch"
+ Background="Transparent" TickPlacement="TopLeft"
+ Margin="0,0,0,5"
/>
+
+ <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Left">
+ <Button Content="Live Preview" Padding="8,2" cal:Message.Attach="[Event Click] = [Action Play]" />
+ <TextBlock Margin="10,0,5,0" VerticalAlignment="Center" Foreground="White" Text="Duration:" />
+ <ComboBox Width="60"
+ ItemsSource="{Binding AvailableDurations}"
+ SelectedItem="{Binding Duration}" />
+
+ <CheckBox VerticalAlignment="Center" Content="Use system default player" Foreground="White" Margin="10,0,0,0" IsChecked="{Binding UseSystemDefaultPlayer}" />
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,5,0,0">
+
+ </StackPanel>
+
+ <Grid Margin="0,10,10,0" Grid.Row="2" Visibility="{Binding IsEncoding, Converter={StaticResource booleanToVisibilityConverter}}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="23*" />
+ <ColumnDefinition Width="289*"/>
+ <ColumnDefinition Width="Auto" MinWidth="50" />
+ </Grid.ColumnDefinitions>
+ <ProgressBar MinHeight="5" Maximum="100" Minimum="0" Value="{Binding PercentageValue}" Grid.Column="0" Grid.ColumnSpan="2" />
+ <TextBlock Margin="5,0,0,0" Text="{Binding Percentage}" Grid.Column="2" HorizontalAlignment="Right" Foreground="White" />
+ </Grid>
+
+
+
+
+ </Grid>
+
+ </Border>
+
</Grid>
</Window>
|