mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibGUI: WidgetScrollable scrolls horizontally when shift is pressed
This commit is contained in:
committed by
Andreas Kling
parent
8b0b653471
commit
7d12e0c7f1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user