Skip to content

Commit

Permalink
fix: Avoid square border around RangeSelector Thumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Apr 15, 2024
1 parent f3eb903 commit a303690
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/RangeSelector/src/RangeSelector.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:CommunityToolkit.WinUI.Controls">
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:not_win="http://uno.ui/not_win"
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation">

<Style BasedOn="{StaticResource DefaultRangeSelectorStyle}"
TargetType="controls:RangeSelector" />
Expand All @@ -25,6 +27,9 @@
TargetType="Thumb">
<Setter Property="UseSystemFocusVisuals" Value="True" />
<Setter Property="BorderThickness" Value="1" />
<win:Setter Property="BorderBrush" Value="{ThemeResource SliderThumbBorderBrush}"/>
<!-- Uno specific (https://github.com/unoplatform/uno/issues/6457): Use solid border brush -->
<not_win:Setter Property="BorderBrush" Value="{ThemeResource ControlStrokeColorDefaultBrush}" />
<Setter Property="Background" Value="{ThemeResource SliderThumbBackground}" />
<Setter Property="Height" Value="{ThemeResource SliderHorizontalThumbHeight}" />
<Setter Property="Width" Value="{ThemeResource SliderHorizontalThumbWidth}" />
Expand All @@ -35,7 +40,7 @@
<ControlTemplate TargetType="Thumb">
<Border Margin="-2"
Background="{ThemeResource SliderOuterThumbBackground}"
BorderBrush="{ThemeResource SliderThumbBorderBrush}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<VisualStateManager.VisualStateGroups>
Expand Down

0 comments on commit a303690

Please sign in to comment.