This is confusing for two reasons:
1. Since they are not applet-specific, the logical place for the user to try to find them is in the KCM, but they're not there.
2. If you have multiple plasma-pa applets (e.g. with a multi-monitor setup where each monitor has a panel with a system tray on it), their settings compete and it's not clear which applet wins.
We should move the settings to the KCM, like the Notifications applet does. It uses kconfig to store the settings data in an rc file rather than the applet config, and implements a global singleton to make this settings data available to all the Notifications applets and let them read the same settings together. To handle the use case of there not being any notifications applets present, the KCM displays an error message and disables the settings that affect the applet when opened with no applets present.
The plasma-pa applet could benefit from doing the same.
*** Bug 454789 has been marked as a duplicate of this bug. ***
(In reply to Nate Graham from comment #0)
> We should move the settings to the KCM, like the Notifications applet does.
> It uses kconfig to store the settings data in an rc file rather than the
> applet config, and implements a global singleton to make this settings data
> available to all the Notifications applets and let them read the same
> settings together. To handle the use case of there not being any
> notifications applets present, the KCM displays an error message and
> disables the settings that affect the applet when opened with no applets
I suspect I might end up doing a lot of this work to implement a global 'Raise maximum volume' switch between KCM and applet. If I do - how might the applet settings living inside the KCM look? My first thought would be to add a section to the lower 1/3 of the page with these settings, but it would probably take too much height from the list view, or hide the presence of the playback streams' volume.
I think how it might have to work is to have two pages under the Audio category, one 'Volume and Devices' (as the default) and another 'Audio Settings', though the latter name is particularly poor.
- On the main page, we add a footer beneath the main view that holds the applet's "Volume Step" and "Raise Maximum Volume" settings. These are just two things so they shouldn't take up an excessive amount of space, hopefully.
- We group the applet's feedback/OSD-related settings in another page or an OverlaySheet that's shown by clicking on a button in the footer area that could be labeled "Change feedback settings" or something.
- The applet's "Show virtual devices" setting stays in the applet but migrates into its hamburger menu, taking the place of "Configure Audio Devices", and then we can delete the applet-specific settings window entirely.
- Optional: instead of deleting the "Raise Maximum Volume" setting from the applet and only having it live in the KCM, we move it to the hamburger menu as well, but keep it in sync with the global setting. Basically it just becomes a quick-access toggle for that global setting.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/145
Git commit 586fb5c315d12a02f2a3e2a524a5b6bf39ba2b52 by Nate Graham, on behalf of Bharadwaj Raju.
Committed on 02/11/2022 at 16:03.
Pushed by ngraham into branch 'master'.
Move applet settings into KCM
Makes various applet-instance-specific settings global, and now configured via
D +0 -16 applet/contents/config/config.qml
M +3 -0 applet/contents/config/main.xml
D +0 -97 applet/contents/ui/ConfigGeneral.qml
M +54 -14 applet/contents/ui/main.qml
M +5 -0 src/CMakeLists.txt
A +104 -0 src/kcm/package/contents/ui/VolumeControlsConfig.qml [License: GPL(v3.0+)]
M +6 -0 src/kcm/package/contents/ui/main.qml
A +42 -0 src/qml/globalconfig.kcfg
A +10 -0 src/qml/globalconfig.kcfgc
A +36 -0 src/qml/globalconfigskeleton.h [License: GPL(v3.0+)]
M +2 -0 src/qml/plugin.cpp