mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +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
|
@ -106,7 +106,7 @@ void PDFViewer::mousewheel_event(GUI::MouseEvent& event)
|
|||
scrollbar.set_value(scrollbar.max());
|
||||
}
|
||||
} else {
|
||||
scrollbar.set_value(scrollbar.value() - 20);
|
||||
scrollbar.decrease_slider_by(20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue