1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

SoundPlayer: Add action with icon for toggling mute

This adds a button on the menubar next to the volume slider to
indicate mute state and allow toggling the mute. Pressing the M key
will still toggle the mute, as before. When muted, the volume scroll
bar now gets disabled.
This commit is contained in:
Andreas Oppebøen 2023-02-28 22:52:43 +01:00 committed by Sam Atkins
parent e33791502f
commit 60908adcbe
2 changed files with 15 additions and 5 deletions

View file

@ -71,11 +71,14 @@ private:
RefPtr<Gfx::Bitmap> m_stop_icon;
RefPtr<Gfx::Bitmap> m_back_icon;
RefPtr<Gfx::Bitmap> m_next_icon;
RefPtr<Gfx::Bitmap> m_volume_icon;
RefPtr<Gfx::Bitmap> m_muted_icon;
RefPtr<GUI::Action> m_play_action;
RefPtr<GUI::Action> m_stop_action;
RefPtr<GUI::Action> m_back_action;
RefPtr<GUI::Action> m_next_action;
RefPtr<GUI::Action> m_mute_action;
RefPtr<GUI::HorizontalSlider> m_playback_progress_slider;
RefPtr<GUI::Label> m_volume_label;