mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +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
|
@ -139,7 +139,7 @@ void OpacitySlider::mouseup_event(MouseEvent& event)
|
|||
|
||||
void OpacitySlider::mousewheel_event(MouseEvent& event)
|
||||
{
|
||||
set_value(value() - event.wheel_delta());
|
||||
decrease_slider_by(event.wheel_delta());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue