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

GUI: Give MouseEvent shift() / ctrl() / alt() / logo() functions

This commit is contained in:
Nico Weber 2020-08-11 21:01:00 -04:00 committed by Andreas Kling
parent eab7712ab0
commit cb2d56b909
2 changed files with 5 additions and 1 deletions

View file

@ -61,7 +61,7 @@ void ScrollableWidget::mousewheel_event(MouseEvent& event)
return;
}
// FIXME: The wheel delta multiplier should probably come from... somewhere?
if (event.modifiers() & Mod_Shift) {
if (event.shift()) {
horizontal_scrollbar().set_value(horizontal_scrollbar().value() + event.wheel_delta() * 60);
} else {
vertical_scrollbar().set_value(vertical_scrollbar().value() + event.wheel_delta() * 20);