mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
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.
This commit is contained in:
parent
8f2161c0ee
commit
46b1c2d609
Notes:
sideshowbarker
2024-07-17 22:17:02 +09:00
Author: https://github.com/elyse0 Commit: https://github.com/SerenityOS/serenity/commit/46b1c2d609f Pull-request: https://github.com/SerenityOS/serenity/pull/11161 Reviewed-by: https://github.com/sin-ack ✅
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue