Fix scroll percentage calculation in Scrollable
This commit is contained in:
parent
c04dff99da
commit
26ed518fbe
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue