summaryrefslogtreecommitdiffstats
path: root/widget/src/vertical_slider.rs
diff options
context:
space:
mode:
authorLibravatar Casper Storm <casper.storm@lich.io>2023-05-23 12:26:16 +0200
committerLibravatar Casper Storm <casper.storm@lich.io>2023-05-23 14:50:29 +0200
commit1c86defab5f5491b5f6b6e45faabf1b91ed195a3 (patch)
treeed8059727e8d3b1845b98b4e66af5d37116efd5d /widget/src/vertical_slider.rs
parent8300d86c242aa3147ec97b2820f774048c285ae8 (diff)
downloadiced-1c86defab5f5491b5f6b6e45faabf1b91ed195a3.tar.gz
iced-1c86defab5f5491b5f6b6e45faabf1b91ed195a3.tar.bz2
iced-1c86defab5f5491b5f6b6e45faabf1b91ed195a3.zip
Extend border radius on relevant widgets
Diffstat (limited to 'widget/src/vertical_slider.rs')
-rw-r--r--widget/src/vertical_slider.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/widget/src/vertical_slider.rs b/widget/src/vertical_slider.rs
index 2635611d..3b2430c4 100644
--- a/widget/src/vertical_slider.rs
+++ b/widget/src/vertical_slider.rs
@@ -366,16 +366,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.width, 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.width, border_radius),
+ };
let value = value.into() as f32;
let (range_start, range_end) = {
@@ -431,7 +431,7 @@ pub fn draw<T, R>(
width: handle_height,
height: handle_width,
},
- border_radius: handle_border_radius.into(),
+ border_radius: handle_border_radius,
border_width: style.handle.border_width,
border_color: style.handle.border_color,
},