mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 01:25:09 +00:00
LibGUI: WidgetScrollable scrolls horizontally when shift is pressed
This commit is contained in:
parent
8b0b653471
commit
7d12e0c7f1
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ void ScrollableWidget::mousewheel_event(MouseEvent& event)
|
|||
return;
|
||||
}
|
||||
// FIXME: The wheel delta multiplier should probably come from... somewhere?
|
||||
vertical_scrollbar().set_value(vertical_scrollbar().value() + event.wheel_delta() * 20);
|
||||
if (event.modifiers() & Mod_Shift) {
|
||||
horizontal_scrollbar().set_value(horizontal_scrollbar().value() + event.wheel_delta() * 60);
|
||||
} else {
|
||||
vertical_scrollbar().set_value(vertical_scrollbar().value() + event.wheel_delta() * 20);
|
||||
}
|
||||
}
|
||||
|
||||
void ScrollableWidget::custom_layout()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue