Avoid checking for scrollbars overlap twice

`[h_]scrollbar_overlaps_point` is already called in 
`DocView.super.on_mouse_moved`.
This commit is contained in:
Guldoman 2021-09-03 20:00:43 +02:00
parent aa3ecd9555
commit c8c00ddde3
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 2 additions and 2 deletions

View File

@ -283,8 +283,8 @@ end
function DocView:on_mouse_moved(x, y, ...)
DocView.super.on_mouse_moved(self, x, y, ...)
if self:scrollbar_overlaps_point(x, y) or self.dragging_scrollbar
or self:h_scrollbar_overlaps_point(x, y) or self.dragging_h_scrollbar then
if self.hovered_scrollbar or self.dragging_scrollbar
or self.hovered_h_scrollbar or self.dragging_h_scrollbar then
self.cursor = "arrow"
else
self.cursor = "ibeam"