1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibGUI: End Scrollbar gutter tinting when target is reached

Before, when holding at a location in the gutter until the scrubber
reached that location, the gutter would stay tinted, even after the
target was reached, and the scrubber didn't move any more; only
stopping when the pointer was moved.
This commit is contained in:
FrHun 2022-06-17 02:48:23 +02:00 committed by Linus Groh
parent 2f388065c8
commit 5a73bf1553

View file

@ -276,7 +276,11 @@ void Scrollbar::on_automatic_scrolling_timer_fired()
}
return;
}
m_gutter_click_state = GutterClickState::NotPressed;
if (m_gutter_click_state != GutterClickState::NotPressed) {
m_gutter_click_state = GutterClickState::NotPressed;
update();
return;
}
}
void Scrollbar::mousedown_event(MouseEvent& event)