summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorElyse <kevincristian@outlook.com>2021-11-01 19:32:35 -0600
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-24 00:19:01 -0800
commit46b1c2d609f46c3d248695d3ec4fc9f0d4fa3a60 (patch)
tree9174620ec7c66915fff3b70d7f998acaf394be81 /Userland
parent8f2161c0ee0c39d2fa0b88a4d72e01fbbbdea1d5 (diff)
downloadserenity-46b1c2d609f46c3d248695d3ec4fc9f0d4fa3a60.zip
SoundPlayer: Add a keyboard shortcut 'M' to mute the player
This shortcut let us mute/unmute the player, but it still doesn't update the volume slider because the actual volume widget can't display a muted state.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp
index b5d8ce353a..4f94fcca07 100644
--- a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp
+++ b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp
@@ -142,6 +142,9 @@ void SoundPlayerWidgetAdvancedView::keydown_event(GUI::KeyEvent& event)
if (event.key() == Key_Space)
m_play_button->click();
+ if (event.key() == Key_M)
+ toggle_mute();
+
if (event.key() == Key_S)
m_stop_button->click();
@@ -182,6 +185,7 @@ void SoundPlayerWidgetAdvancedView::loop_mode_changed(Player::LoopMode)
void SoundPlayerWidgetAdvancedView::mute_changed(bool)
{
+ // FIXME: Update the volume slider when player is muted
}
void SoundPlayerWidgetAdvancedView::sync_previous_next_buttons()