mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user