summaryrefslogtreecommitdiffstats
path: root/widget/src/slider.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-05-23 20:03:05 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-23 20:03:05 +0200
commit6c6930b91df0d7637ed6c0f3f4e57a03c5e5896f (patch)
treeb03c16cd71c4f2b79c87e2fa7a605ed0e5f901d5 /widget/src/slider.rs
parent8300d86c242aa3147ec97b2820f774048c285ae8 (diff)
parent25804d9e5ad67d26fafb437057bc0fddde04512a (diff)
downloadiced-6c6930b91df0d7637ed6c0f3f4e57a03c5e5896f.tar.gz
iced-6c6930b91df0d7637ed6c0f3f4e57a03c5e5896f.tar.bz2
iced-6c6930b91df0d7637ed6c0f3f4e57a03c5e5896f.zip
Merge pull request #1869 from casperstorm/extend-border-radius
Extended border radius on relevant widgets
Diffstat (limited to 'widget/src/slider.rs')
-rw-r--r--widget/src/slider.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/widget/src/slider.rs b/widget/src/slider.rs
index 18a49665..2851d8c3 100644
--- a/widget/src/slider.rs
+++ b/widget/src/slider.rs
@@ -368,16 +368,16 @@ pub fn draw<T, R>(
style_sheet.active(style)
};
- let (handle_width, handle_height, handle_border_radius) = match style
- .handle
- .shape
- {
- HandleShape::Circle { radius } => (radius * 2.0, radius * 2.0, radius),
- HandleShape::Rectangle {
- width,
- border_radius,
- } => (f32::from(width), bounds.height, border_radius),
- };
+ let (handle_width, handle_height, handle_border_radius) =
+ match style.handle.shape {
+ HandleShape::Circle { radius } => {
+ (radius * 2.0, radius * 2.0, radius.into())
+ }
+ HandleShape::Rectangle {
+ width,
+ border_radius,
+ } => (f32::from(width), bounds.height, border_radius),
+ };
let value = value.into() as f32;
let (range_start, range_end) = {
@@ -433,7 +433,7 @@ pub fn draw<T, R>(
width: handle_width,
height: handle_height,
},
- border_radius: handle_border_radius.into(),
+ border_radius: handle_border_radius,
border_width: style.handle.border_width,
border_color: style.handle.border_color,
},