Skip to content

Commit 79fe44b

Browse files
committed
fixed usage of SecondaryHueMidBrush and SecondaryHueMidForegroundBrush resources
1 parent 6b1ed35 commit 79fe44b

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

MaterialDesignExtensions/Themes/ResourceDictionaryExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public static void SetExtendedTheme(this ResourceDictionary resourceDictionary,
5757
SetSolidColorBrush(resourceDictionary, "SecondaryHueDarkForegroundBrush", theme.SecondaryDark.ForegroundColor ?? theme.SecondaryDark.Color.ContrastingForegroundColor());
5858

5959
// these are here for backwards compatibility, and will be removed in a future version.
60-
SetSolidColorBrush(resourceDictionary, "SecondaryAccentBrush", theme.SecondaryMid.Color);
61-
SetSolidColorBrush(resourceDictionary, "SecondaryAccentForegroundBrush", theme.SecondaryMid.ForegroundColor ?? theme.SecondaryMid.Color.ContrastingForegroundColor());
60+
SetSolidColorBrush(resourceDictionary, "SecondaryHueMidBrush", theme.SecondaryMid.Color);
61+
SetSolidColorBrush(resourceDictionary, "SecondaryHueMidForegroundBrush", theme.SecondaryMid.ForegroundColor ?? theme.SecondaryMid.Color.ContrastingForegroundColor());
6262

6363
SetSolidColorBrush(resourceDictionary, "ValidationErrorBrush", theme.ValidationError);
6464
resourceDictionary["ValidationErrorColor"] = theme.ValidationError;
@@ -89,8 +89,8 @@ public static IExtendedTheme GetExtendedTheme(this ResourceDictionary resourceDi
8989
return theme;
9090
}
9191

92-
Color secondaryMid = GetColor(resourceDictionary, "SecondaryHueMidBrush", "SecondaryAccentBrush");
93-
Color secondaryMidForeground = GetColor(resourceDictionary, "SecondaryHueMidForegroundBrush", "SecondaryAccentForegroundBrush");
92+
Color secondaryMid = GetColor(resourceDictionary, "SecondaryHueMidBrush", "SecondaryHueMidBrush");
93+
Color secondaryMidForeground = GetColor(resourceDictionary, "SecondaryHueMidForegroundBrush", "SecondaryHueMidForegroundBrush");
9494

9595
if (!TryGetColor(resourceDictionary, "SecondaryHueLightBrush", out Color secondaryLight))
9696
{

MaterialDesignExtensions/Themes/TabControlTemplates.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@
233233
</Style>
234234

235235
<Style x:Key="MaterialDesignAppBarAccentTabControl" TargetType="{x:Type TabControl}" BasedOn="{StaticResource MaterialDesignTabControl}">
236-
<Setter Property="controls:TabControlAssist.TabHeaderHighlightBrush" Value="{DynamicResource SecondaryAccentBrush}" />
237-
<Setter Property="controls:TabControlAssist.TabHeaderInactiveBrush" Value="{DynamicResource SecondaryAccentBrush}" />
236+
<Setter Property="controls:TabControlAssist.TabHeaderHighlightBrush" Value="{DynamicResource SecondaryHueMidBrush}" />
237+
<Setter Property="controls:TabControlAssist.TabHeaderInactiveBrush" Value="{DynamicResource SecondaryHueMidBrush}" />
238238
<Setter Property="controls:TabControlAssist.TabHeaderInactiveOpacity" Value="0.8" />
239239
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
240240
</Style>

MaterialDesignExtensionsDemo/Controls/AppBarControl.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<Canvas.RenderTransform>
1919
<TranslateTransform X="0" Y="-161.53332"/>
2020
</Canvas.RenderTransform>
21-
<Rectangle Canvas.Left="5.2916665" Canvas.Top="167.35416" Width="124.35417" Height="124.35418" StrokeThickness="5.08370417" Stroke="{DynamicResource SecondaryAccentBrush}" StrokeMiterLimit="4" Opacity="1"/>
22-
<Ellipse Canvas.Left="10" Width="114.9" Canvas.Top="172.1" Height="114.7" StrokeThickness="5.19894171" Stroke="{DynamicResource SecondaryAccentBrush}" StrokeMiterLimit="4" Opacity="1"/>
23-
<Path StrokeThickness="5.0270834" Stroke="{DynamicResource SecondaryAccentBrush}" StrokeMiterLimit="4" StrokeLineJoin="Miter" StrokeStartLineCap="Flat" StrokeEndLineCap="Flat">
21+
<Rectangle Canvas.Left="5.2916665" Canvas.Top="167.35416" Width="124.35417" Height="124.35418" StrokeThickness="5.08370417" Stroke="{DynamicResource SecondaryHueMidBrush}" StrokeMiterLimit="4" Opacity="1"/>
22+
<Ellipse Canvas.Left="10" Width="114.9" Canvas.Top="172.1" Height="114.7" StrokeThickness="5.19894171" Stroke="{DynamicResource SecondaryHueMidBrush}" StrokeMiterLimit="4" Opacity="1"/>
23+
<Path StrokeThickness="5.0270834" Stroke="{DynamicResource SecondaryHueMidBrush}" StrokeMiterLimit="4" StrokeLineJoin="Miter" StrokeStartLineCap="Flat" StrokeEndLineCap="Flat">
2424
<Path.Data>
2525
<PathGeometry Figures="M 23.8125 257.31249 H 111.125 L 67.733333 178.20207 Z" FillRule="NonZero"/>
2626
</Path.Data>

ReleaseNotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,4 @@ Please change your configuration according to [App.xaml](https://github.com/spie
196196
* New `SearchBase.CancelIcon` and `SearchBase.ClearIcon` properties
197197
#### Fixes
198198
* Fixed reflection code in `ResourceDictionaryExtensions`
199+
* Fixed usage of `SecondaryHueMidBrush` and `SecondaryHueMidForegroundBrush` resources

docs/snippets/releasenotes.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ <h3>Features</h3>
5454
<h3>Fixes</h3>
5555
<ul>
5656
<li>Fixed exception in <code>Stepper</code> events</li>
57+
<li>Fixed usage of <code>SecondaryHueMidBrush</code> and <code>SecondaryHueMidForegroundBrush</code> resources</li>
5758
</ul>
5859
<h2>v3.1.0</h2>
5960
<h3>Features</h3>

0 commit comments

Comments
 (0)