Skip to content

Commit

Permalink
Apply ThemedImageEffect to Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
diluculo committed Nov 8, 2019
1 parent e8dfaf7 commit aab6444
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/Gemini/Themes/VS2013/Controls/Menu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shaderEffects="clr-namespace:Gemini.Framework.ShaderEffects"
xmlns:converters="clr-namespace:Gemini.Framework.ShaderEffects.Converters"
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock">

<converters:BindingProxy x:Key="DefaultBackground" Data="{DynamicResource MenuDefaultBackground}"/>
<converters:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter"/>

<Geometry x:Key="Checkmark">
M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z
</Geometry>
Expand Down Expand Up @@ -151,7 +155,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Height="16" Width="16"
ContentSource="Icon" />
ContentSource="Icon">
<ContentPresenter.Effect>
<shaderEffects:ThemedImageEffect Background="{Binding Converter={StaticResource SolidColorBrushToColorConverter}, Mode=OneWay,
Source={StaticResource DefaultBackground}, Path=Data}"
IsEnabled="{Binding Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}, Path=IsEnabled}"/>
</ContentPresenter.Effect>
</ContentPresenter>
<Border x:Name="Check"
VerticalAlignment="Center" HorizontalAlignment="Center"
Width="16" Height="16"
Expand Down Expand Up @@ -217,7 +227,13 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Height="16" Width="16"
ContentSource="Icon" />
ContentSource="Icon">
<ContentPresenter.Effect>
<shaderEffects:ThemedImageEffect Background="{Binding Converter={StaticResource SolidColorBrushToColorConverter}, Mode=OneWay,
Source={StaticResource DefaultBackground}, Path=Data}"
IsEnabled="{Binding Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}, Path=IsEnabled}"/>
</ContentPresenter.Effect>
</ContentPresenter>
</Grid>
</Border>
<Border Grid.Column="1" Padding="6 2 0 2">
Expand Down

0 comments on commit aab6444

Please sign in to comment.