Skip to content

Commit

Permalink
Fix icon colors not updating when changing app theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Zawodowiec1532 authored and azeier committed Sep 7, 2017
1 parent 556364e commit 75743a8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
22 changes: 10 additions & 12 deletions Hearthstone Deck Tracker/Controls/DeckPicker/DeckPicker.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@
</Style.Triggers>
</Style>
</Grid.Style>
<Rectangle Name="RectangleSearchIcon" Margin="2"
<Rectangle Name="RectangleSearchIcon" Margin="2" Fill="{DynamicResource TextBrush}"
Visibility="{Binding VisibilitySearchIcon, RelativeSource={RelativeSource AncestorType=deckPicker:DeckPicker}}"
PreviewMouseLeftButtonUp="RectangleSearchIcon_OnPreviewMouseLeftButtonUp">
<Rectangle.Fill>
<Rectangle.OpacityMask>
<VisualBrush Visual="{DynamicResource appbar_magnify}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
<Rectangle Name="RectangleCloseIcon" Margin="2"
<Rectangle Name="RectangleCloseIcon" Margin="2" Fill="{DynamicResource TextBrush}"
Visibility="{Binding VisibilitySearchBar, RelativeSource={RelativeSource AncestorType=deckPicker:DeckPicker}}"
PreviewMouseLeftButtonUp="RectangleCloseIcon_OnPreviewMouseLeftButtonUp">
<Rectangle.Fill>
<Rectangle.OpacityMask>
<VisualBrush Visual="{DynamicResource appbar_close}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</Grid>
</Border>
Expand All @@ -64,11 +64,10 @@
</Style.Triggers>
</Style>
</Grid.Style>
<Rectangle Name="RectangleSortIcon" Margin="2"
PreviewMouseLeftButtonUp="RectangleSortIcon_OnPreviewMouseLeftButtonUp">
<Rectangle.Fill>
<Rectangle Name="RectangleSortIcon" Margin="2" Fill="{DynamicResource TextBrush}" PreviewMouseLeftButtonUp="RectangleSortIcon_OnPreviewMouseLeftButtonUp">
<Rectangle.OpacityMask>
<VisualBrush Visual="{DynamicResource appbar_arrow_up_down}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</Grid>
</Border>
Expand Down Expand Up @@ -123,8 +122,7 @@
</Style.Triggers>
</Style>
</Grid.Style>
<TextBlock Text="{lex:LocTextUpper DeckPicker_Button_NoDeckMode}" Margin="6,0" FontSize="14" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center"
Foreground="{Binding BorderDeckModeTextBrush, RelativeSource={RelativeSource AncestorType=deckPicker:DeckPicker}}"/>
<TextBlock Text="{lex:LocTextUpper DeckPicker_Button_NoDeckMode}" Margin="6,0" FontSize="14" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
</Border>
<Border BorderThickness="1" Margin="0,2,0,0" BorderBrush="{DynamicResource TextBrush}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<Menu>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_New}">
<MenuItem.Icon>
<Rectangle>
<Rectangle.Fill>
<Rectangle Fill="{DynamicResource TextBrush}">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_layer_add}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
<MenuItem.Resources>
Expand Down Expand Up @@ -87,10 +87,10 @@
</MenuItem>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Deck}" IsEnabled="{Binding HasSelectedDeck}" SubmenuOpened="Deck_OnSubmenuOpened">
<MenuItem.Icon>
<Rectangle>
<Rectangle.Fill>
<Rectangle Fill="{DynamicResource TextBrush}">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_layer}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Deck_EditDeck}" Command="{Binding EditDeckCommand}" />
Expand Down Expand Up @@ -123,10 +123,10 @@
</MenuItem>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Import}">
<MenuItem.Icon>
<Rectangle>
<Rectangle.Fill>
<Rectangle Fill="{DynamicResource TextBrush}">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_download}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Import_Web}" Command="{Binding ImportFromWebCommand}" />
Expand All @@ -145,10 +145,10 @@
</MenuItem>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Export}" IsEnabled="{Binding HasSelectedDeck}">
<MenuItem.Icon>
<Rectangle>
<Rectangle.Fill>
<Rectangle Fill="{DynamicResource TextBrush}">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_upload}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Export_Hearthstone}" Command="{Binding ExportDeckCommand}" />
Expand All @@ -160,10 +160,10 @@
</MenuItem>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Stats}">
<MenuItem.Icon>
<Rectangle>
<Rectangle.Fill>
<Rectangle Fill="{DynamicResource TextBrush}">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_graph_line}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Stats_Arena}" Command="{Binding ArenaStatsCommand}" />
Expand All @@ -174,10 +174,10 @@
<CollectionViewSource x:Key="LatestReplaysCollection" Source="{Binding LatestReplays}"/>
</MenuItem.Resources>
<MenuItem.Icon>
<Rectangle>
<Rectangle.Fill>
<Rectangle Fill="{DynamicResource TextBrush}">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_chevron_right}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
<MenuItem Header="{lex:LocTextUpper MainWindow_Menu_Replays_Latest}">
Expand Down Expand Up @@ -220,10 +220,10 @@
<CollectionViewSource x:Key="PluginsCollection" Source="{Binding PluginsMenuItems}"/>
</MenuItem.Resources>
<MenuItem.Icon>
<Rectangle>
<Rectangle.Fill>
<Rectangle Fill="{DynamicResource TextBrush}">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_puzzle_round}" />
</Rectangle.Fill>
</Rectangle.OpacityMask>
</Rectangle>
</MenuItem.Icon>
<MenuItem.ItemsSource>
Expand Down

0 comments on commit 75743a8

Please sign in to comment.