Skip to content

Commit ad7237f

Browse files
MartinZikmundArlodotexe
authored andcommitted
fix: Avoid square border around RangeSelector Thumbs
1 parent 5eb73f6 commit ad7237f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/RangeSelector/src/RangeSelector.xaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<!-- 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. -->
22
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:controls="using:CommunityToolkit.WinUI.Controls">
4+
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
5+
xmlns:not_win="http://uno.ui/not_win"
6+
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
57

68
<Style BasedOn="{StaticResource DefaultRangeSelectorStyle}"
79
TargetType="controls:RangeSelector" />
@@ -25,6 +27,9 @@
2527
TargetType="Thumb">
2628
<Setter Property="UseSystemFocusVisuals" Value="True" />
2729
<Setter Property="BorderThickness" Value="1" />
30+
<win:Setter Property="BorderBrush" Value="{ThemeResource SliderThumbBorderBrush}"/>
31+
<!-- Uno specific (https://github.com/unoplatform/uno/issues/6457): Use solid border brush -->
32+
<not_win:Setter Property="BorderBrush" Value="{ThemeResource ControlStrokeColorDefaultBrush}" />
2833
<Setter Property="Background" Value="{ThemeResource SliderThumbBackground}" />
2934
<Setter Property="Height" Value="{ThemeResource SliderHorizontalThumbHeight}" />
3035
<Setter Property="Width" Value="{ThemeResource SliderHorizontalThumbWidth}" />
@@ -35,7 +40,7 @@
3540
<ControlTemplate TargetType="Thumb">
3641
<Border Margin="-2"
3742
Background="{ThemeResource SliderOuterThumbBackground}"
38-
BorderBrush="{ThemeResource SliderThumbBorderBrush}"
43+
BorderBrush="{TemplateBinding BorderBrush}"
3944
BorderThickness="{TemplateBinding BorderThickness}"
4045
CornerRadius="{TemplateBinding CornerRadius}">
4146
<VisualStateManager.VisualStateGroups>

0 commit comments

Comments
 (0)