diff options
author | 2023-06-01 13:30:48 +0200 | |
---|---|---|
committer | 2023-06-01 13:30:48 +0200 | |
commit | 1e2965d5423fc35943388aa32a6cae2c6b0f2336 (patch) | |
tree | 7dacf30e0ca87b09b3b61d801e0e2c016e5dfaae /widget/src/vertical_slider.rs | |
parent | 9902e778167af8d4b108102619ee1ed8d0de0be5 (diff) | |
download | iced-1e2965d5423fc35943388aa32a6cae2c6b0f2336.tar.gz iced-1e2965d5423fc35943388aa32a6cae2c6b0f2336.tar.bz2 iced-1e2965d5423fc35943388aa32a6cae2c6b0f2336.zip |
only add border radius to the visible part
Diffstat (limited to 'widget/src/vertical_slider.rs')
-rw-r--r-- | widget/src/vertical_slider.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/widget/src/vertical_slider.rs b/widget/src/vertical_slider.rs index b14e5401..c6569c13 100644 --- a/widget/src/vertical_slider.rs +++ b/widget/src/vertical_slider.rs @@ -365,6 +365,7 @@ pub fn draw<T, R>( } else { style_sheet.active(style) }; + let border_radius: [f32; 4] = style.rail.border_radius.into(); let (handle_width, handle_height, handle_border_radius) = match style.handle.shape { @@ -401,7 +402,8 @@ pub fn draw<T, R>( width: style.rail.width, height: offset + handle_width / 2.0, }, - border_radius: style.rail.border_radius, + border_radius: [border_radius[0], border_radius[1], 0.0, 0.0] + .into(), border_width: 0.0, border_color: Color::TRANSPARENT, }, @@ -416,7 +418,8 @@ pub fn draw<T, R>( width: style.rail.width, height: bounds.height - offset - handle_width / 2.0, }, - border_radius: style.rail.border_radius, + border_radius: [0.0, 0.0, border_radius[2], border_radius[3]] + .into(), border_width: 0.0, border_color: Color::TRANSPARENT, }, |