mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibGUI+LibWeb: Use 'decrease_slider_by_steps()' method
This method allow us to avoid repeating the pattern 'set_value(value() - step() * step_number)'.
This commit is contained in:
parent
cee4e02134
commit
8d1fb299b1
2 changed files with 3 additions and 3 deletions
|
@ -257,13 +257,13 @@ void InProcessWebView::keydown_event(GUI::KeyEvent& event)
|
|||
vertical_scrollbar().increase_slider_by_steps(1);
|
||||
break;
|
||||
case Key_Up:
|
||||
vertical_scrollbar().set_value(vertical_scrollbar().value() - vertical_scrollbar().step());
|
||||
vertical_scrollbar().decrease_slider_by_steps(1);
|
||||
break;
|
||||
case Key_Left:
|
||||
horizontal_scrollbar().increase_slider_by_steps(1);
|
||||
break;
|
||||
case Key_Right:
|
||||
horizontal_scrollbar().set_value(horizontal_scrollbar().value() - horizontal_scrollbar().step());
|
||||
horizontal_scrollbar().decrease_slider_by_steps(1);
|
||||
break;
|
||||
case Key_PageDown:
|
||||
vertical_scrollbar().increase_slider_by(frame_inner_rect().height());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue