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:
parent
076827a05d
commit
dc3c6be6f2
2 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue