mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-25 12:32:53 +00:00
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:
parent
d53e1fa1fa
commit
086615535f
Notes:
sideshowbarker
2024-07-17 21:55:24 +09:00
Author: https://github.com/elyse0
Commit: 086615535f
Pull-request: https://github.com/SerenityOS/serenity/pull/11163
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/metmo ✅
8 changed files with 10 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue