Skip to content

panel: Add advanced volume OSD

Devin Lin requested to merge work/volumeosd into master

This adds https://invent.kde.org/plasma/plasma-phone-components/-/issues/67 a more advanced volume osd, that also allows for users to quickly change audio sinks, sources, as well as adjust different audio stream volumes. It effectively has the same function as the audio applet in the tray on the desktop.

When users press their hardware volume buttons, the standard volume OSD shows up, which also includes a toolbutton that can toggle visibility for the full applet.

This will also fix the issues with the current volume OSD taking up the fullscreen.

I considered, and attempted to use the desktop audio applet instead, but it unfortunately conflicts with the existing volume provider (duplicate shortcuts and OSDs), and is also not exactly great to use with touch due to the density of controls.

Known Issues:

The context menu for each output stream is borrowed from plasma-pa. It seems that there is an issue where if you close the context menu without clicking on an option (elsewhere on the screen) the OSD stops accepting touch input. Pressing the application close button on the bottom panel will close the osd to get around it. It seems to work fine though if you do click on an option in the context menu.

TODO:

  • Figure out a way to import https://invent.kde.org/plasma/plasma-pa/-/blob/master/src/qml/listitemmenu.h so that I can use the menu without copy pasting the code
  • Fix application streams not showing up
  • Switch from the current Kirigami ApplicationWindow being used to a NanoShell.FullScreenOverlay, after figuring out why there is such a performance difference when opening
  • Remove experiments with loading applets in popups from MR

Screenshot_20210506_144626

Edited by Devin Lin

Merge request reports