mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:27:43 +00:00
Everywhere: Use 'increase_slider_by()' method from AbstractSlider
This method help us to avoid repeating the pattern 'set_value(value() + delta)'.
This commit is contained in:
parent
8b8f404146
commit
d53e1fa1fa
12 changed files with 19 additions and 19 deletions
|
@ -239,7 +239,7 @@ void RollWidget::mouseup_event([[maybe_unused]] GUI::MouseEvent& event)
|
|||
void RollWidget::mousewheel_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.modifiers() & KeyModifier::Mod_Shift) {
|
||||
horizontal_scrollbar().set_value(horizontal_scrollbar().value() + (event.wheel_delta() * horizontal_scroll_sensitivity));
|
||||
horizontal_scrollbar().increase_slider_by(event.wheel_delta() * horizontal_scroll_sensitivity);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue