Skip to content

Commit

Permalink
Improved styling customization SizerBase (#96)
Browse files Browse the repository at this point in the history
* Updating SizerBase

* Bump version number

* Remove margin
  • Loading branch information
niels9001 authored Jun 14, 2023
1 parent 7885900 commit 57697fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ToolkitComponentName>Sizers</ToolkitComponentName>
<Description>This package contains SizerBase.</Description>
<Version>8.0.0-beta.2</Version>
<Version>8.0.0-beta.3</Version>

<!-- Rns suffix is required for namespaces shared across projects. See https://github.com/CommunityToolkit/Labs-Windows/issues/152 -->
<RootNamespace>CommunityToolkit.WinUI.Controls.SizersRns</RootNamespace>
Expand Down
8 changes: 5 additions & 3 deletions components/Sizers/src/SizerBase.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<x:Double x:Key="SizerBaseThumbHeight">24</x:Double>
<x:Double x:Key="SizerBaseThumbWidth">4</x:Double>
<x:Double x:Key="SizerBaseThumbRadius">2</x:Double>
<Thickness x:Key="SizerBaseThumbMargin">4</Thickness>
<Thickness x:Key="SizerBasePadding">4</Thickness>

<Style TargetType="controls:SizerBase">
<Setter Property="IsTabStop" Value="True" />
Expand All @@ -54,6 +54,7 @@
<Setter Property="IsFocusEngagementEnabled" Value="True" />
<Setter Property="MinHeight" Value="8" />
<Setter Property="MinWidth" Value="8" />
<Setter Property="Padding" Value="{ThemeResource SizerBasePadding}" />
<Setter Property="Foreground" Value="{ThemeResource SizerBaseForeground}" />
<Setter Property="Background" Value="{ThemeResource SizerBaseBackground}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
Expand All @@ -66,7 +67,8 @@
<Grid x:Name="RootGrid"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid.BackgroundTransition>
<BrushTransition Duration="0:0:0.083" />
</Grid.BackgroundTransition>
Expand Down Expand Up @@ -112,7 +114,7 @@
<Rectangle x:Name="PART_Thumb"
Width="{ThemeResource SizerBaseThumbWidth}"
Height="{ThemeResource SizerBaseThumbHeight}"
Margin="{ThemeResource SizerBaseThumbMargin}"
Margin="{TemplateBinding Padding}"
Fill="{TemplateBinding Foreground}"
RadiusX="{ThemeResource SizerBaseThumbRadius}"
RadiusY="{ThemeResource SizerBaseThumbRadius}" />
Expand Down

0 comments on commit 57697fb

Please sign in to comment.