diff options
author | Nick Miller <nick.miller.83@gmail.com> | 2021-06-03 15:18:54 -0700 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-06-08 00:54:07 +0430 |
commit | 17c78be334f8ce153838df6d5562d3cc8cd4f77a (patch) | |
tree | bcf616f0d4fdaa879ac163d9f7f75189aea1a145 /Userland/Applications/SoundPlayer | |
parent | e0a2c1544fbb9fbc46a6ea845e61c38bfc91fe26 (diff) | |
download | serenity-17c78be334f8ce153838df6d5562d3cc8cd4f77a.zip |
SoundPlayer: Enable stop button when play button clicked
Previously, if you play a file, then stop, then play again, the stop
button will be permanently disabled until you open a file again.
The stop button should be enabled whenever a file is loaded.
This commit fixes the GUI bug by enabling the stop button whenever the
play button is clicked (if a file is currently loaded).
Diffstat (limited to 'Userland/Applications/SoundPlayer')
-rw-r--r-- | Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp index 778fdc0dcb..fc67aab216 100644 --- a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp +++ b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp @@ -72,6 +72,7 @@ SoundPlayerWidgetAdvancedView::SoundPlayerWidgetAdvancedView(GUI::Window& window bool paused = this->manager().toggle_pause(); set_paused(paused); m_play_button->set_icon(paused ? *m_play_icon : *m_pause_icon); + m_stop_button->set_enabled(has_loaded_file()); }; m_stop_button = menubar.add<GUI::Button>(); |