1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:17:42 +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:
Elyse 2021-10-31 12:27:52 -06:00 committed by Andreas Kling
parent d53e1fa1fa
commit 086615535f
8 changed files with 10 additions and 10 deletions

View file

@ -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);
}
}
}