summaryrefslogtreecommitdiffstats
path: root/widget/src/slider.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-02 06:40:48 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-02 06:40:48 +0200
commit8e8808f0e187ed6671441f5016f07bfcba426452 (patch)
treebc4d2eeb57f60e654a4a8ed7c562f79ee507abab /widget/src/slider.rs
parent2d7d9a130ece3fb6fa4cd52f9b32b4abd7887cf5 (diff)
parentc8952ee4a1118fe67bfdf40fc77f3ff30f5d0278 (diff)
downloadiced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.gz
iced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.bz2
iced-8e8808f0e187ed6671441f5016f07bfcba426452.zip
Merge branch 'master' into advanced-text
Diffstat (limited to 'widget/src/slider.rs')
-rw-r--r--widget/src/slider.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/widget/src/slider.rs b/widget/src/slider.rs
index 5a884e21..18a49665 100644
--- a/widget/src/slider.rs
+++ b/widget/src/slider.rs
@@ -389,7 +389,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)
};
@@ -415,7 +415,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(),