summaryrefslogtreecommitdiffstats
path: root/native/src/widget/slider.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/slider.rs')
-rw-r--r--native/src/widget/slider.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs
index ba467834..cfb0a8fe 100644
--- a/native/src/widget/slider.rs
+++ b/native/src/widget/slider.rs
@@ -391,7 +391,7 @@ pub fn draw<T, R>(
let offset = if range_start >= range_end {
0.0
} else {
- (bounds.width - handle_width / 2.0) * (value - range_start)
+ (bounds.width - handle_width) * (value - range_start)
/ (range_end - range_start)
};
@@ -417,7 +417,7 @@ pub fn draw<T, R>(
bounds: Rectangle {
x: bounds.x + offset + handle_width / 2.0,
y: rail_y - style.rail.width / 2.0,
- width: bounds.width - offset,
+ width: bounds.width - offset - handle_width / 2.0,
height: style.rail.width,
},
border_radius: Default::default(),