1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

SoundPlayer+VideoPlayer: Set the play/pause action text on state change

This commit is contained in:
Timothy Flynn 2022-11-19 09:56:36 -05:00 committed by Andreas Kling
parent 4addad67d1
commit 34fd5cb206
2 changed files with 7 additions and 2 deletions

View file

@ -170,6 +170,7 @@ void SoundPlayerWidgetAdvancedView::play_state_changed(Player::PlayState state)
m_play_action->set_enabled(state != PlayState::NoFileLoaded);
m_play_action->set_icon(state == PlayState::Playing ? m_pause_icon : m_play_icon);
m_play_action->set_text(state == PlayState::Playing ? "Pause"sv : "Play"sv);
m_stop_action->set_enabled(state != PlayState::Stopped && state != PlayState::NoFileLoaded);