mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 22:54:57 +00:00
LibGUI: Implement keyboard and mouse wheel events for SpinBox
This commit is contained in:
parent
17846dd063
commit
5f913c67d9
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