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:
parent
4addad67d1
commit
34fd5cb206
2 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue