From 26ed518fbead46440a3f52dbf017505c6cf4b597 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 21 Dec 2019 07:09:50 +0100 Subject: Fix scroll percentage calculation in `Scrollable` --- native/src/widget/scrollable.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 872c59cb..9fa602d5 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -415,7 +415,8 @@ impl Scrollbar { grabbed_at: f32, cursor_position: Point, ) -> f32 { - (cursor_position.y + self.bounds.y + (cursor_position.y + - self.bounds.y - self.scroller.bounds.height * grabbed_at) / (self.bounds.height - self.scroller.bounds.height) } -- cgit