Skip to content

Commit 5f5eb3e

Browse files
authored
TabView: update scroll button resources (#5006)
1 parent de852ee commit 5f5eb3e

2 files changed

Lines changed: 32 additions & 12 deletions

File tree

dev/TabView/TabView.xaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@
195195
VerticalAlignment="Bottom">
196196
<RepeatButton x:Name="ScrollDecreaseButton"
197197
AutomationProperties.AccessibilityView="Raw"
198-
Background="{ThemeResource TabViewScrollButtonBackground}"
199198
Delay="50"
200199
Interval="100"
201200
HighContrastAdjustment="None"
@@ -723,8 +722,8 @@
723722
</Style>
724723

725724
<Style x:Name="TabViewScrollButtonStyle" TargetType="RepeatButton">
726-
<Setter Property="Background" Value="{ThemeResource TabViewButtonBackground}"/>
727-
<Setter Property="Foreground" Value="{ThemeResource TabViewButtonForeground}"/>
725+
<Setter Property="Background" Value="{ThemeResource TabViewScrollButtonBackground}"/>
726+
<Setter Property="Foreground" Value="{ThemeResource TabViewScrollButtonForeground}"/>
728727
<contract7Present:Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}"/>
729728
<Setter Property="FontSize" Value="{ThemeResource TabViewItemScrollButonFontSize}"/>
730729
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}"/>
@@ -756,32 +755,32 @@
756755
<VisualState x:Name="PointerOver">
757756
<Storyboard>
758757
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
759-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewButtonBackgroundPointerOver}" />
758+
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewScrollButtonBackgroundPointerOver}" />
760759
</ObjectAnimationUsingKeyFrames>
761760
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
762-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewButtonForegroundPointerOver}" />
761+
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewScrollButtonForegroundPointerOver}" />
763762
</ObjectAnimationUsingKeyFrames>
764763
</Storyboard>
765764
</VisualState>
766765

767766
<VisualState x:Name="Pressed">
768767
<Storyboard>
769768
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
770-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewButtonBackgroundPressed}" />
769+
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewScrollButtonBackgroundPressed}" />
771770
</ObjectAnimationUsingKeyFrames>
772771
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
773-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewButtonForegroundPressed}" />
772+
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewScrollButtonForegroundPressed}" />
774773
</ObjectAnimationUsingKeyFrames>
775774
</Storyboard>
776775
</VisualState>
777776

778777
<VisualState x:Name="Disabled">
779778
<Storyboard>
780779
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
781-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewButtonBackgroundDisabled}" />
780+
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewScrollButtonBackgroundDisabled}" />
782781
</ObjectAnimationUsingKeyFrames>
783782
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
784-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewButtonForegroundDisabled}" />
783+
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewScrollButtonForegroundDisabled}" />
785784
</ObjectAnimationUsingKeyFrames>
786785
</Storyboard>
787786
</VisualState>

dev/TabView/TabView_themeresources.xaml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ResourceDictionary x:Key="Light">
99
<StaticResource x:Key="TabViewBackground" ResourceKey="SubtleFillColorTransparentBrush" />
1010
<StaticResource x:Key="TabViewItemHeaderBackground" ResourceKey="SubtleFillColorTransparentBrush" />
11-
<StaticResource x:Key="TabViewItemHeaderBackgroundSelected" ResourceKey="SolidBackgroundFillColorTertiary" />
11+
<StaticResource x:Key="TabViewItemHeaderBackgroundSelected" ResourceKey="SolidBackgroundFillColorTertiaryBrush" />
1212
<StaticResource x:Key="TabViewItemHeaderBackgroundPointerOver" ResourceKey="SubtleFillColorSecondaryBrush" />
1313
<StaticResource x:Key="TabViewItemHeaderBackgroundPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
1414
<StaticResource x:Key="TabViewItemHeaderBackgroundDisabled" ResourceKey="SubtleFillColorTransparentBrush" />
@@ -31,6 +31,13 @@
3131
<StaticResource x:Key="TabViewButtonForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
3232
<StaticResource x:Key="TabViewButtonForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
3333
<StaticResource x:Key="TabViewScrollButtonBackground" ResourceKey="SubtleFillColorTransparentBrush" />
34+
<StaticResource x:Key="TabViewScrollButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
35+
<StaticResource x:Key="TabViewScrollButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondaryBrush" />
36+
<StaticResource x:Key="TabViewScrollButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparentBrush" />
37+
<StaticResource x:Key="TabViewScrollButtonForeground" ResourceKey="TextFillColorSecondaryBrush" />
38+
<StaticResource x:Key="TabViewScrollButtonForegroundPressed" ResourceKey="TextFillColorSecondaryBrush" />
39+
<StaticResource x:Key="TabViewScrollButtonForegroundPointerOver" ResourceKey="TextFillColorSecondaryBrush" />
40+
<StaticResource x:Key="TabViewScrollButtonForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
3441
<StaticResource x:Key="TabViewItemSeparator" ResourceKey="DividerStrokeColorDefaultBrush" />
3542
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackground" ResourceKey="SubtleFillColorTransparentBrush" />
3643
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
@@ -67,7 +74,7 @@
6774
<ResourceDictionary x:Key="Dark">
6875
<StaticResource x:Key="TabViewBackground" ResourceKey="SubtleFillColorTransparentBrush" />
6976
<StaticResource x:Key="TabViewItemHeaderBackground" ResourceKey="SubtleFillColorTransparentBrush" />
70-
<StaticResource x:Key="TabViewItemHeaderBackgroundSelected" ResourceKey="SolidBackgroundFillColorTertiary" />
77+
<StaticResource x:Key="TabViewItemHeaderBackgroundSelected" ResourceKey="SolidBackgroundFillColorTertiaryBrush" />
7178
<StaticResource x:Key="TabViewItemHeaderBackgroundPointerOver" ResourceKey="SubtleFillColorSecondaryBrush" />
7279
<StaticResource x:Key="TabViewItemHeaderBackgroundPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
7380
<StaticResource x:Key="TabViewItemHeaderBackgroundDisabled" ResourceKey="SubtleFillColorTransparentBrush" />
@@ -90,6 +97,13 @@
9097
<StaticResource x:Key="TabViewButtonForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
9198
<StaticResource x:Key="TabViewButtonForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
9299
<StaticResource x:Key="TabViewScrollButtonBackground" ResourceKey="SubtleFillColorTransparentBrush" />
100+
<StaticResource x:Key="TabViewScrollButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
101+
<StaticResource x:Key="TabViewScrollButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondaryBrush" />
102+
<StaticResource x:Key="TabViewScrollButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparentBrush" />
103+
<StaticResource x:Key="TabViewScrollButtonForeground" ResourceKey="TextFillColorSecondaryBrush" />
104+
<StaticResource x:Key="TabViewScrollButtonForegroundPressed" ResourceKey="TextFillColorSecondaryBrush" />
105+
<StaticResource x:Key="TabViewScrollButtonForegroundPointerOver" ResourceKey="TextFillColorSecondaryBrush" />
106+
<StaticResource x:Key="TabViewScrollButtonForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
93107
<StaticResource x:Key="TabViewItemSeparator" ResourceKey="DividerStrokeColorDefaultBrush" />
94108
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackground" ResourceKey="SubtleFillColorTransparentBrush" />
95109
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
@@ -149,6 +163,13 @@
149163
<StaticResource x:Key="TabViewButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
150164
<StaticResource x:Key="TabViewButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
151165
<StaticResource x:Key="TabViewScrollButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
166+
<StaticResource x:Key="TabViewScrollButtonBackgroundPressed" ResourceKey="SystemControlHighlightChromeHighBrush" />
167+
<StaticResource x:Key="TabViewScrollButtonBackgroundPointerOver" ResourceKey="SystemControlHighlightChromeHighBrush" />
168+
<StaticResource x:Key="TabViewScrollButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
169+
<StaticResource x:Key="TabViewScrollButtonForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />
170+
<StaticResource x:Key="TabViewScrollButtonForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
171+
<StaticResource x:Key="TabViewScrollButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
172+
<StaticResource x:Key="TabViewScrollButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
152173
<StaticResource x:Key="TabViewItemSeparator" ResourceKey="SystemControlForegroundBaseLowBrush" />
153174
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
154175
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
@@ -205,7 +226,7 @@
205226

206227
<x:Double x:Key="TabViewItemScrollButtonWidth">32</x:Double>
207228
<x:Double x:Key="TabViewItemScrollButtonHeight">24</x:Double>
208-
<x:Double x:Key="TabViewItemScrollButonFontSize">12</x:Double>
229+
<x:Double x:Key="TabViewItemScrollButonFontSize">8</x:Double>
209230
<Thickness x:Key="TabViewItemScrollButtonPadding">7,3,7,3</Thickness>
210231
<Thickness x:Key="TabViewItemLeftScrollButtonContainerPadding">0,0,3,3</Thickness>
211232
<Thickness x:Key="TabViewItemRightScrollButtonContainerPadding">3,0,0,3</Thickness>

0 commit comments

Comments
 (0)