mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibGUI+SoundPlayer: Use 'decrease_slider_by_page_steps()' method
This method allow us to avoid repeating the pattern 'set_value(value() - page_step() * page_number)'.
This commit is contained in:
parent
0d660b27ae
commit
173a84a2ef
2 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ void Slider::mousedown_event(MouseEvent& event)
|
|||
if (mouse_offset > knob_last_edge)
|
||||
increase_slider_by_page_steps(1);
|
||||
else if (mouse_offset < knob_first_edge)
|
||||
set_value(value() - page_step());
|
||||
decrease_slider_by_page_steps(1);
|
||||
}
|
||||
}
|
||||
return Widget::mousedown_event(event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue