Skip to content

Commit

Permalink
Update RepeatButton (#3963)
Browse files Browse the repository at this point in the history
* Update RepeatButton

* update visual ver files
  • Loading branch information
beervoley authored Jan 19, 2021
1 parent 773ef30 commit 9818540
Show file tree
Hide file tree
Showing 26 changed files with 362 additions and 30,600 deletions.
44 changes: 26 additions & 18 deletions dev/CommonStyles/RepeatButton_themeresources.xaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<Thickness x:Key="RepeatButtonBorderThemeThickness">1</Thickness>
<StaticResource x:Key="RepeatButtonBackground" ResourceKey="ControlFillColorTertiaryBrush" />
<SolidColorBrush x:Key="RepeatButtonBackgroundPointerOver" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
<StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="ControlAltFillColorQuarternaryBrush" />
<StaticResource x:Key="RepeatButtonBackgroundDisabled" ResourceKey="ControlFillColorTertiaryBrush" />
<StaticResource x:Key="RepeatButtonBackground" ResourceKey="ControlFillColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
<StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
<StaticResource x:Key="RepeatButtonBackgroundDisabled" ResourceKey="ControlFillColorDisabledBrush" />
<StaticResource x:Key="RepeatButtonForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="TextFillColorSecondaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
<StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="GhostFillColorDisabledBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
<!-- Legacy Brushes -->
<SolidColorBrush x:Key="RepeatButtonBorderThemeBrush" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="RepeatButtonDisabledBackgroundThemeBrush" Color="Transparent" />
<SolidColorBrush x:Key="RepeatButtonDisabledBorderThemeBrush" Color="#66FFFFFF" />
Expand Down Expand Up @@ -56,18 +57,19 @@
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<Thickness x:Key="RepeatButtonBorderThemeThickness">1</Thickness>
<StaticResource x:Key="RepeatButtonBackground" ResourceKey="ControlFillColorTertiaryBrush" />
<SolidColorBrush x:Key="RepeatButtonBackgroundPointerOver" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
<StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="ControlAltFillColorQuarternaryBrush" />
<StaticResource x:Key="RepeatButtonBackgroundDisabled" ResourceKey="ControlFillColorTertiaryBrush" />
<StaticResource x:Key="RepeatButtonBackground" ResourceKey="ControlFillColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
<StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
<StaticResource x:Key="RepeatButtonBackgroundDisabled" ResourceKey="ControlFillColorDisabledBrush" />
<StaticResource x:Key="RepeatButtonForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="TextFillColorSecondaryBrush" />
<StaticResource x:Key="RepeatButtonForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
<StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="GhostFillColorDisabledBrush" />
<StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
<!-- Legacy Brushes -->
<SolidColorBrush x:Key="RepeatButtonBorderThemeBrush" Color="#33000000" />
<SolidColorBrush x:Key="RepeatButtonDisabledBackgroundThemeBrush" Color="#66CACACA" />
<SolidColorBrush x:Key="RepeatButtonDisabledBorderThemeBrush" Color="#1A000000" />
Expand All @@ -84,11 +86,12 @@

<Style x:Key="DefaultRepeatButtonStyle" TargetType="RepeatButton">
<Setter Property="Background" Value="{ThemeResource RepeatButtonBackground}" />
<contract7Present:Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<contract7Present:Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
<Setter Property="Foreground" Value="{ThemeResource RepeatButtonForeground}" />
<Setter Property="BorderBrush" Value="{ThemeResource RepeatButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
<contract7NotPresent:Setter Property="Padding" Value="11,5,11,5" />
<contract7Present:Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
Expand All @@ -114,6 +117,11 @@
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw">

<contract7Present:ContentPresenter.BackgroundTransition>
<contract7Present:BrushTransition Duration="0:0:0.083" />
</contract7Present:ContentPresenter.BackgroundTransition>

<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
Expand Down
48 changes: 24 additions & 24 deletions test/MUXControlsTestApp/verification/NavigationViewAuto-4.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1845,11 +1845,11 @@
Visibility=Visible
RenderSize=0,0
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Width=16
Name=HorizontalSmallDecrease
MinHeight=16
Expand All @@ -1861,11 +1861,11 @@
Visibility=Visible
RenderSize=0,0
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Width=0
Name=HorizontalLargeDecrease
Margin=0,0,0,0
Expand All @@ -1892,11 +1892,11 @@
Visibility=Collapsed
RenderSize=0,0
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Name=HorizontalLargeIncrease
Margin=0,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
Expand All @@ -1906,11 +1906,11 @@
Visibility=Visible
RenderSize=0,0
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Width=16
Name=HorizontalSmallIncrease
MinHeight=16
Expand Down Expand Up @@ -1977,11 +1977,11 @@
Visibility=Visible
RenderSize=16,40
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Name=VerticalSmallDecrease
MinWidth=16
Margin=0,0,0,0
Expand Down Expand Up @@ -2040,11 +2040,11 @@
Visibility=Visible
RenderSize=16,8
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Name=VerticalLargeDecrease
Margin=0,0,0,0
Height=0
Expand Down Expand Up @@ -2085,11 +2085,11 @@
Visibility=Collapsed
RenderSize=0,0
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Name=VerticalLargeIncrease
Margin=0,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
Expand All @@ -2113,11 +2113,11 @@
Visibility=Visible
RenderSize=16,8
[Windows.UI.Xaml.Controls.Primitives.RepeatButton]
Padding=11,5,11,6
Padding=11,5,11,5
Foreground=#E4000000
BorderThickness=1,1,1,1
BorderBrush=#0F000000
Background=#4DF9F9F9
BorderBrush=Windows.UI.Xaml.Media.LinearGradientBrush
Background=#B3FFFFFF
Name=VerticalSmallIncrease
MinWidth=16
Margin=0,0,0,0
Expand Down
Loading

0 comments on commit 9818540

Please sign in to comment.