diff options
author | sr55 <[email protected]> | 2013-06-02 17:02:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-06-02 17:02:42 +0000 |
commit | 392005a7d2341fa497f929b7549b749c51c249d6 (patch) | |
tree | f007591e4fc2839a547bdef5049854a972a5c818 /win/CS/HandBrakeWPF/Views | |
parent | 1d0553ef556d8979e0c4897cd77a5d6ceaec8221 (diff) |
WinGui: Some usability improvements around presets. Also trying out a "Hide Presets Panel" option similar to that of the macgui.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5544 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ChaptersView.xaml | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 48 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ShellView.xaml | 5 |
3 files changed, 49 insertions, 8 deletions
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml index 0895579f5..583e2c41d 100644 --- a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml +++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml @@ -3,6 +3,8 @@ 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"
+ d:DesignHeight="170"
+ d:DesignWidth="616"
mc:Ignorable="d" >
<Grid>
<Grid.RowDefinitions>
@@ -26,7 +28,7 @@ </Grid>
<DataGrid Grid.Row="2" Margin="10" ItemsSource="{Binding Task.ChapterNames}"
- VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoGenerateColumns="False"
+ VerticalAlignment="Stretch" AutoGenerateColumns="False"
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False"
CanUserAddRows="False" CanUserDeleteRows="False">
<DataGrid.CellStyle>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 8d7575f54..fd95a5b53 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -121,6 +121,45 @@ </MenuItem>
</MenuItem>
+
+ <MenuItem Header="Presets" x:Name="presetMenu">
+ <MenuItem Header="Presets" ItemsSource="{Binding Presets}">
+ <MenuItem.ItemContainerStyle>
+ <Style TargetType="MenuItem">
+ <Setter Property="Tag" Value="{Binding}" />
+ <Setter Property="Micro:Action.TargetWithoutContext" Value="{Binding DataContext, ElementName=presetMenu}"/>
+ <Setter Property="Micro:Message.Attach" Value="[Event Click] = [Action PresetSelect($this.Tag)]"/>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsDefault}" Value="True">
+ <Setter Property="FontStyle" Value="Italic" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </MenuItem.ItemContainerStyle>
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Import" Micro:Message.Attach="[Event Click] = [Action PresetImport]" />
+ <MenuItem Header="Export" Micro:Message.Attach="[Event Click] = [Action PresetExport]" />
+ <Separator />
+ <MenuItem Header="Set Current as Default" Micro:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
+ <MenuItem Header="Reset Built-In Presets" Micro:Message.Attach="[Event Click] = [Action PresetReset]" />
+ <Separator />
+ <MenuItem IsCheckable="True" x:Name="showPresetPanelMenuItem" IsChecked="{Binding IsPresetPanelShowing}">
+ <MenuItem.Style>
+ <Style TargetType="MenuItem">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsChecked, ElementName=showPresetPanelMenuItem}" Value="True">
+ <Setter Property="Header" Value="Hide Preset Panel"/>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsChecked, ElementName=showPresetPanelMenuItem}" Value="False">
+ <Setter Property="Header" Value="Show Preset Panel"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </MenuItem.Style>
+ </MenuItem>
+ </MenuItem>
+
<MenuItem Header="Help">
<MenuItem Header="HandBrake User Guide (HTTP)" Micro:Message.Attach="[Event Click] = [Action LaunchHelp]">
<MenuItem.Icon>
@@ -323,8 +362,8 @@ <!-- Main Body -->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="270" />
+ <ColumnDefinition Width="*" MinWidth="700"/>
+ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -379,7 +418,7 @@ Converter={StaticResource boolToVisConverter},
ConverterParameter=false}"
/>
-
+
<Label Margin="8,0,0,0" Content="through" />
<ComboBox Name="EndPoint"
MinWidth="60"
@@ -396,7 +435,7 @@ Converter={StaticResource boolToVisConverter},
ConverterParameter=false}"
/>
-
+
<Label Margin="8,0,0,0" Content="Duration" />
<Label Margin="8,0,0,0" Content="{Binding Duration}" />
</StackPanel>
@@ -515,6 +554,7 @@ Header="Presets"
Margin="0,0,0,5"
Background="White"
+ Visibility="{Binding IsPresetPanelShowing, Converter={StaticResource boolToVisConverter}}"
>
<Grid>
<Grid.RowDefinitions>
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml index bfc65c035..d719b16fd 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml @@ -4,12 +4,11 @@ xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" Title="{Data:Binding Path=WindowTitle}"
Width="1015"
- Height="680"
- MinWidth="1015"
+ Height="670"
+ MinWidth="750"
MinHeight="670"
AllowDrop="True"
Background="#FFF0F0F0"
- FontSize="11"
SnapsToDevicePixels="True"
UseLayoutRounding="True"
WindowStartupLocation="CenterScreen"
|