diff options
author | sr55 <[email protected]> | 2013-06-01 14:21:10 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-06-01 14:21:10 +0000 |
commit | ca5ac69f4f80e86e396f0c21aa5a16c364997b89 (patch) | |
tree | 5b962419fe18a97b64ad8646205dca0d354e6e22 /win/CS/HandBrakeWPF/Views | |
parent | 665b3364b361897b572bfafb80e36a993668a943 (diff) |
WinGui: Change the Add button on the Audio/Subtitle tabs to DropButtons to better expose the add options.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5538 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AudioView.xaml | 19 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Styles/Styles.xaml | 24 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/SubtitlesView.xaml | 17 |
4 files changed, 49 insertions, 13 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index 1a1042e4d..28d17d776 100644 --- a/win/CS/HandBrakeWPF/Views/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -9,7 +9,7 @@ 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:controls="clr-namespace:HandBrakeWPF.Controls"
+ xmlns:dropButton="clr-namespace:HandBrakeWPF.Controls.DropButton"
d:DesignHeight="170"
d:DesignWidth="616"
mc:Ignorable="d">
@@ -42,15 +42,22 @@ </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0">
- <Button MinWidth="65"
- Margin="0,0,10,0"
- cal:Message.Attach="[Event Click] = [Action Add]"
- Content="Add Track" />
-
+ <dropButton:DropButton Content="Add Track" FontWeight="Bold" Margin="0,0,10,0" Style="{StaticResource DropButtonStyle}">
+ <dropButton:DropButton.DropDown>
+ <ContextMenu>
+ <MenuItem Header="Add New Track" cal:Message.Attach="[Event Click] = [Action Add]" />
+ <MenuItem Header="Add All Remaining Tracks" cal:Message.Attach="[Event Click] = [Action AddAllRemaining]" />
+ <MenuItem Header="Add All Remaining Selected Languages" cal:Message.Attach="[Event Click] = [Action AddAllRemainingForSelectedLanguages]" />
+ </ContextMenu>
+ </dropButton:DropButton.DropDown>
+ </dropButton:DropButton>
+
<Button MinWidth="65"
Margin="0,0,10,0"
cal:Message.Attach="[Event Click] = [Action Clear]"
Content="Clear" />
+
+
</StackPanel>
<StackPanel Grid.Column="2"
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index a1f2c9e5e..8d7575f54 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -271,7 +271,7 @@ </StackPanel>
</MenuItem.Header>
<MenuItem Header="Add All" Micro:Message.Attach="[Event Click] = [Action AddAllToQueue]" />
- <!--<MenuItem Header="Add Selection" Micro:Message.Attach="[Event Click] = [Action AddSelectionToQueue]" />-->
+ <MenuItem Header="Add Selection" Micro:Message.Attach="[Event Click] = [Action AddSelectionToQueue]" />
</MenuItem>
</Menu>
diff --git a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml index 407666234..88624c5df 100644 --- a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml +++ b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml @@ -3,7 +3,6 @@ <Style x:Key="{x:Type StatusBar}" TargetType="{x:Type StatusBar}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type StatusBar}">
@@ -34,4 +33,27 @@ <SolidColorBrush x:Key="GlyphBrush" Color="#444"/>
+ <Style x:Key="DropButtonStyle" TargetType="ToggleButton" >
+ <Setter Property="Padding" Value="2,2" />
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <Grid VerticalAlignment="Stretch">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <TextBlock Text="{TemplateBinding Content}" Margin="4,0,0,0" Grid.Column="0" />
+
+ <!--<Rectangle Grid.Column="1" Width="1" Fill="Black" Opacity="0.4" Margin="6,2,0,2"/>-->
+
+ <Path Data="M 0,0 L 8,0 L 4,4 Z" Fill="Black" Grid.Column="2" Margin="4,0,4,0" VerticalAlignment="Center"/>
+ </Grid>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
</ResourceDictionary>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 48c2e68b0..2eeb5dfdf 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -9,6 +9,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
+ xmlns:dropButton="clr-namespace:HandBrakeWPF.Controls.DropButton"
d:DesignHeight="153"
d:DesignWidth="319"
mc:Ignorable="d">
@@ -29,11 +30,17 @@ Text="Subtitles" />
<StackPanel Grid.Row="1" Margin="10,5,10,0" Orientation="Horizontal">
- <Button Name="AddTrack"
- MinWidth="75"
- Margin="0,0,10,0"
- cal:Message.Attach="[Event Click] = [Action Add]"
- Content="Add" />
+ <dropButton:DropButton Content="Add Track" FontWeight="Bold" Margin="0,0,10,0" Style="{StaticResource DropButtonStyle}">
+ <dropButton:DropButton.DropDown>
+ <ContextMenu>
+ <MenuItem Header="Add New Track" cal:Message.Attach="[Event Click] = [Action Add]" />
+ <MenuItem Header="Add All Remaining Tracks" cal:Message.Attach="[Event Click] = [Action AddAllRemaining]" />
+ <MenuItem Header="Add All Remaining Closed Captions" cal:Message.Attach="[Event Click] = [Action AddAllClosedCaptions]" />
+ <MenuItem Header="Add All Remaining Selected Languages" cal:Message.Attach="[Event Click] = [Action AddAllRemainingForSelectedLanguages]" />
+ </ContextMenu>
+ </dropButton:DropButton.DropDown>
+ </dropButton:DropButton>
+
<Button MinWidth="75"
cal:Message.Attach="[Event Click] = [Action Import]"
Content="Import SRT"
|