summaryrefslogtreecommitdiffstats
path: root/widget/src/slider.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-01 17:27:52 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-01 17:27:52 +0200
commit66d4decc0c5c6ea787ec482ff6841829dfc7ffba (patch)
tree8be933918394879cd926508ae7c3fcbe2b917797 /widget/src/slider.rs
parentee0dd4c623f579635ae74db3d22256090c17a1eb (diff)
downloadiced-66d4decc0c5c6ea787ec482ff6841829dfc7ffba.tar.gz
iced-66d4decc0c5c6ea787ec482ff6841829dfc7ffba.tar.bz2
iced-66d4decc0c5c6ea787ec482ff6841829dfc7ffba.zip
Fix `quad` glitch when rounding borders of a `Slider` rail
Diffstat (limited to 'widget/src/slider.rs')
-rw-r--r--widget/src/slider.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/widget/src/slider.rs b/widget/src/slider.rs
index af6a824f..c2498b87 100644
--- a/widget/src/slider.rs
+++ b/widget/src/slider.rs
@@ -367,7 +367,6 @@ 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 {
@@ -404,8 +403,7 @@ pub fn draw<T, R>(
width: offset + handle_width / 2.0,
height: style.rail.width,
},
- border_radius: [border_radius[0], 0.0, 0.0, border_radius[3]]
- .into(),
+ border_radius: style.rail.border_radius,
border_width: 0.0,
border_color: Color::TRANSPARENT,
},
@@ -420,8 +418,7 @@ pub fn draw<T, R>(
width: bounds.width - offset - handle_width / 2.0,
height: style.rail.width,
},
- border_radius: [0.0, border_radius[1], border_radius[2], 0.0]
- .into(),
+ border_radius: style.rail.border_radius,
border_width: 0.0,
border_color: Color::TRANSPARENT,
},