Everywhere: Use 'decrease_slider_by()' method from AbstractSlider

The same idea as 'increase_slider_by()', it helps us to avoid repeating
the pattern 'set_value(value() - delta)'.
This commit is contained in:
Elyse 2021-10-31 12:27:52 -06:00 committed by Andreas Kling
parent d53e1fa1fa
commit 086615535f
Notes: sideshowbarker 2024-07-17 21:55:24 +09:00
8 changed files with 10 additions and 10 deletions

View file

@ -269,7 +269,7 @@ void InProcessWebView::keydown_event(GUI::KeyEvent& event)
vertical_scrollbar().increase_slider_by(frame_inner_rect().height());
break;
case Key_PageUp:
vertical_scrollbar().set_value(vertical_scrollbar().value() - frame_inner_rect().height());
vertical_scrollbar().decrease_slider_by(frame_inner_rect().height());
break;
default:
if (!page_accepted_event) {