1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 23:08: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:
Elyse 2021-10-31 12:38:15 -06:00 committed by Andreas Kling
parent 0d660b27ae
commit 173a84a2ef
2 changed files with 2 additions and 2 deletions

View file

@ -152,7 +152,7 @@ void SoundPlayerWidgetAdvancedView::keydown_event(GUI::KeyEvent& event)
m_volume_slider->increase_slider_by_page_steps(1);
if (event.key() == Key_Down)
m_volume_slider->set_value(m_volume_slider->value() - m_volume_slider->page_step());
m_volume_slider->decrease_slider_by_page_steps(1);
GUI::Widget::keydown_event(event);
}