Skip to content

Commit

Permalink
Merge pull request #839 from niels9001/development
Browse files Browse the repository at this point in the history
Various brush fixes
  • Loading branch information
pomianowski authored Nov 24, 2023
2 parents 8dbb625 + 9ad2aa9 commit ada8fcb
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 48 deletions.
12 changes: 2 additions & 10 deletions src/Wpf.Ui.SyntaxHighlight/Controls/CodeBlock.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,8 @@
<Thickness x:Key="CodeBlockBorderThemeThickness">1</Thickness>

<Style TargetType="{x:Type syntax:CodeBlock}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource ControlFillColorDefault}" />
</Setter.Value>
</Setter>
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource TextFillColorPrimary}" />
</Setter.Value>
</Setter>
<Setter Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}"/>
<Setter Property="Padding" Value="{StaticResource CodeBlockPadding}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource CodeBlockBorderThemeThickness}" />
Expand Down
20 changes: 4 additions & 16 deletions src/Wpf.Ui/Controls/Badge/Badge.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
This Source Code Form is subject to the terms of the MIT License.
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
Expand All @@ -11,16 +11,8 @@
xmlns:controls="clr-namespace:Wpf.Ui.Controls">

<Style TargetType="{x:Type controls:Badge}">
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource TextFillColorPrimary}" />
</Setter.Value>
</Setter>
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource SystemAccentColorSecondary}" />
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="{DynamicResource BadgeForeground}"/>
<Setter Property="Background" Value="{DynamicResource BadgeBackground}"/>
<!--<Setter Property="BorderBrush" Value="{DynamicResource SystemAccentBrush}" />-->
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Padding" Value="4" />
Expand All @@ -41,11 +33,7 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Appearance" Value="Primary">
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource TextOnAccentFillColorPrimary}" />
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="{DynamicResource BadgeForeground}"/>
</Trigger>
<Trigger Property="Appearance" Value="Transparent">
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
Expand Down
7 changes: 2 additions & 5 deletions src/Wpf.Ui/Controls/CardColor/CardColor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@
<TextBlock
Margin="0"
FontSize="{TemplateBinding SubtitleFontSize}"
Text="{TemplateBinding Subtitle}">
<TextBlock.Foreground>
<SolidColorBrush Color="{DynamicResource CardForegroundPressed}" />
</TextBlock.Foreground>
</TextBlock>
Foreground="{DynamicResource CardForegroundPressed}"
Text="{TemplateBinding Subtitle}" />
</StackPanel>
</Border>
</ControlTemplate>
Expand Down
7 changes: 1 addition & 6 deletions src/Wpf.Ui/Controls/ComboBox/ComboBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Wpf.Ui.Controls"
xmlns:converters="clr-namespace:Wpf.Ui.Converters"
xmlns:system="clr-namespace:System;assembly=System.Runtime">

<Thickness x:Key="ComboBoxPadding">10,8,10,8</Thickness>
Expand Down Expand Up @@ -138,11 +137,7 @@
<Setter TargetName="PART_ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelected}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource ComboBoxItemForeground}" />
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down
5 changes: 1 addition & 4 deletions src/Wpf.Ui/Controls/NavigationView/NavigationViewTop.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,11 @@
BorderBrush="{DynamicResource FlyoutBackground}"
BorderThickness="1"
CornerRadius="8"
Background="{DynamicResource FlyoutBorderBrush}"
SnapsToDevicePixels="True">
<Border.RenderTransform>
<TranslateTransform />
</Border.RenderTransform>
<Border.Background>
<SolidColorBrush Color="{DynamicResource FlyoutBorderBrush}" />
</Border.Background>

<Border.Effect>
<DropShadowEffect
BlurRadius="20"
Expand Down
1 change: 1 addition & 0 deletions src/Wpf.Ui/Controls/TitleBar/TitleBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
<!-- Main application title -->
<TextBlock
Grid.Column="1"
FontSize="12"
VerticalAlignment="Center"
Text="{TemplateBinding Title}" />
</Grid>
Expand Down
5 changes: 3 additions & 2 deletions src/Wpf.Ui/Resources/Theme/Dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@
<!-- Control brushes -->

<!-- Badge -->
<!-- TODO -->

<SolidColorBrush x:Key="BadgeForeground" Color="{StaticResource TextOnAccentFillColorPrimary}"/>
<SolidColorBrush x:Key="BadgeBackground" Color="{StaticResource SystemAccentColorPrimary}"/>

<!-- BreadcrumbBar -->
<SolidColorBrush x:Key="BreadcrumbBarNormalForegroundBrush" Color="{StaticResource TextFillColorPrimary}" />
<SolidColorBrush x:Key="BreadcrumbBarHoverForegroundBrush" Color="{StaticResource TextFillColorSecondary}" />
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui/Resources/Theme/HC1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@
<!-- Control brushes -->

<!-- Badge -->
<!-- TODO -->
<SolidColorBrush x:Key="BadgeForeground" Color="{StaticResource SystemColorHighlightTextColor}"/>
<SolidColorBrush x:Key="BadgeBackground" Color="{StaticResource SystemColorHighlightColor}"/>

<!-- BreadcrumbBar -->
<SolidColorBrush x:Key="BreadcrumbBarNormalForegroundBrush" Color="{StaticResource SystemColorButtonTextColor}" />
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui/Resources/Theme/HC2.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@
<!-- Control brushes -->

<!-- Badge -->
<!-- TODO -->
<SolidColorBrush x:Key="BadgeForeground" Color="{StaticResource SystemColorHighlightTextColor}"/>
<SolidColorBrush x:Key="BadgeBackground" Color="{StaticResource SystemColorHighlightColor}"/>

<!-- BreadcrumbBar -->
<SolidColorBrush x:Key="BreadcrumbBarNormalForegroundBrush" Color="{StaticResource SystemColorButtonTextColor}" />
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui/Resources/Theme/HCBlack.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@
<!-- Control brushes -->

<!-- Badge -->
<!-- TODO -->
<SolidColorBrush x:Key="BadgeForeground" Color="{StaticResource SystemColorHighlightTextColor}"/>
<SolidColorBrush x:Key="BadgeBackground" Color="{StaticResource SystemColorHighlightColor}"/>

<!-- BreadcrumbBar -->
<SolidColorBrush x:Key="BreadcrumbBarNormalForegroundBrush" Color="{StaticResource SystemColorButtonTextColor}" />
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui/Resources/Theme/HCWhite.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@
<!-- Control brushes -->

<!-- Badge -->
<!-- TODO -->
<SolidColorBrush x:Key="BadgeForeground" Color="{StaticResource SystemColorHighlightTextColor}" />
<SolidColorBrush x:Key="BadgeBackground" Color="{StaticResource SystemColorHighlightColor}" />

<!-- BreadcrumbBar -->
<SolidColorBrush x:Key="BreadcrumbBarNormalForegroundBrush" Color="{StaticResource SystemColorButtonTextColor}" />
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui/Resources/Theme/Light.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@
<!-- Control brushes -->

<!-- Badge -->
<!-- TODO -->
<SolidColorBrush x:Key="BadgeForeground" Color="{StaticResource TextOnAccentFillColorPrimary}" />
<SolidColorBrush x:Key="BadgeBackground" Color="{StaticResource SystemAccentColorPrimary}" />

<!-- BreadcrumbBar -->
<SolidColorBrush x:Key="BreadcrumbBarNormalForegroundBrush" Color="{StaticResource TextFillColorPrimary}" />
Expand Down

0 comments on commit ada8fcb

Please sign in to comment.