diff options
author | sr55 <[email protected]> | 2013-08-22 18:13:10 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-08-22 18:13:10 +0000 |
commit | 6a5bc28b115a8702d055e96ba745e5391e57fb22 (patch) | |
tree | 3092afec6788dbc8ad0686fc9e36416a152f0b58 /win/CS/HandBrakeWPF/Themes | |
parent | 2f353d02a675d3d99883a8e6b6d8bacd7cc31c5a (diff) |
WinGui: Missing theme file from last checkin.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5735 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Themes')
-rw-r--r-- | win/CS/HandBrakeWPF/Themes/Generic.xaml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Themes/Generic.xaml b/win/CS/HandBrakeWPF/Themes/Generic.xaml new file mode 100644 index 000000000..460177769 --- /dev/null +++ b/win/CS/HandBrakeWPF/Themes/Generic.xaml @@ -0,0 +1,52 @@ +<ResourceDictionary
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
+ xmlns:splitButton="clr-namespace:HandBrakeWPF.Controls.SplitButton">
+
+ <Style TargetType="{x:Type splitButton:SplitMenuButton}" BasedOn="{StaticResource {x:Type Button}}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type splitButton:SplitMenuButton}">
+ <mwt:ButtonChrome x:Name="Chrome" Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}"
+ RenderDefaulted="{TemplateBinding Button.IsDefaulted}" RenderMouseOver="{TemplateBinding UIElement.IsMouseOver}"
+ RenderPressed="{TemplateBinding ButtonBase.IsPressed}" SnapsToDevicePixels="True">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition/>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+
+ <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+ ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+ Margin="5,0,5,0" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
+ VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" />
+
+ <Rectangle Grid.Column="1" Width="1" Fill="{TemplateBinding Foreground}" Opacity="0.4" Margin="0 4 0 4"/>
+
+ <Grid x:Name="SplitElement" Grid.Column="2" Background="Transparent">
+ <ContextMenuService.ContextMenu>
+ <ContextMenu ItemsSource="{Binding ItemSource, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{TemplateBinding Foreground}" FlowDirection="{TemplateBinding FlowDirection}"/>
+ </ContextMenuService.ContextMenu>
+ <Path Data="M 0,0 L 8,0 L 4,4 Z" Fill="{TemplateBinding Foreground}" Margin="5 0 5 0" VerticalAlignment="Center"/>
+ </Grid>
+ </Grid>
+ </mwt:ButtonChrome>
+ <ControlTemplate.Triggers>
+ <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
+ <Setter Property="mwt:ButtonChrome.RenderDefaulted" TargetName="Chrome" Value="True" />
+ </Trigger>
+ <Trigger Property="ToggleButton.IsChecked" Value="True">
+ <Setter Property="mwt:ButtonChrome.RenderPressed" TargetName="Chrome" Value="True" />
+ </Trigger>
+ <Trigger Property="UIElement.IsEnabled" Value="False">
+ <Setter Property="Control.Foreground" Value="#FFADADAD" />
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+</ResourceDictionary>
|