From 9902e778167af8d4b108102619ee1ed8d0de0be5 Mon Sep 17 00:00:00 2001 From: Casper Storm Date: Thu, 1 Jun 2023 10:46:33 +0200 Subject: Add border_radius to slider rail --- style/src/slider.rs | 2 ++ style/src/theme.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'style/src') diff --git a/style/src/slider.rs b/style/src/slider.rs index ca115f46..f0068558 100644 --- a/style/src/slider.rs +++ b/style/src/slider.rs @@ -17,6 +17,8 @@ pub struct Rail { pub colors: (Color, Color), /// The width of the stroke of a slider rail. pub width: f32, + /// The border radius of the corners of the rail. + pub border_radius: BorderRadius, } /// The appearance of the handle of a slider. diff --git a/style/src/theme.rs b/style/src/theme.rs index 4a8ee749..4fef8554 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -433,9 +433,10 @@ impl slider::StyleSheet for Theme { rail: slider::Rail { colors: ( palette.primary.base.color, - palette.primary.base.color, + palette.secondary.base.color, ), width: 2.0, + border_radius: Default::default(), }, handle: slider::Handle { color: palette.background.base.color, -- cgit