1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

GScrollBar: Allow scrolling the scrollbar by mouse-wheeling over it

This commit is contained in:
Andreas Kling 2019-08-20 20:10:02 +02:00
parent 076827a05d
commit dc3c6be6f2
2 changed files with 11 additions and 0 deletions

View file

@ -281,6 +281,14 @@ void GScrollBar::mouseup_event(GMouseEvent& event)
update();
}
void GScrollBar::mousewheel_event(GMouseEvent& event)
{
if (!is_scrollable())
return;
set_value(value() + event.wheel_delta());
GWidget::mousewheel_event(event);
}
void GScrollBar::set_automatic_scrolling_active(bool active)
{
if (active) {