mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +00:00
LibGUI: Implement keyboard and mouse wheel events for SpinBox
This commit is contained in:
parent
17846dd063
commit
5f913c67d9
Notes:
sideshowbarker
2024-07-19 09:07:52 +09:00
Author: https://github.com/xTibor
Commit: 5f913c67d9
Pull-request: https://github.com/SerenityOS/serenity/pull/1284
4 changed files with 34 additions and 5 deletions
|
@ -56,6 +56,10 @@ ScrollableWidget::~ScrollableWidget()
|
|||
|
||||
void ScrollableWidget::mousewheel_event(MouseEvent& event)
|
||||
{
|
||||
if (!m_scrollbars_enabled) {
|
||||
event.ignore();
|
||||
return;
|
||||
}
|
||||
// FIXME: The wheel delta multiplier should probably come from... somewhere?
|
||||
vertical_scrollbar().set_value(vertical_scrollbar().value() + event.wheel_delta() * 20);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue