diff options
authorKai Uwe Broulik <[email protected]>2017-01-13 14:15:05 +0100
committerKai Uwe Broulik <[email protected]>2017-01-13 14:15:05 +0100
commit2b404bd65c582505a838930be6d725f09df0f1e6 (patch)
parentc47072294589f7033c6e933a381956e3f1c4ae54 (diff)
[Task Manager] Don't show separator between media controls and "Mute"
While they're technically separate for the user they're semantically related. After the separator we have a Quit and Raise option for launchers but we cannot have an audio stream for a non-window since we don't know the PID so we can do this here. Differential Revision:
1 files changed, 5 insertions, 1 deletions
diff --git a/applets/taskmanager/package/contents/ui/ContextMenu.qml b/applets/taskmanager/package/contents/ui/ContextMenu.qml
index a09a429..2896548 100644
--- a/applets/taskmanager/package/contents/ui/ContextMenu.qml
+++ b/applets/taskmanager/package/contents/ui/ContextMenu.qml
@@ -155,7 +155,11 @@ PlasmaComponents.ContextMenu {
menu.addMenuItem(menuItem, virtualDesktopsMenuItem);
- menu.addMenuItem(newSeparator(menu), virtualDesktopsMenuItem);
+ // Technically media controls and audio streams are separate but for the user they're
+ // semantically related, don't add a separator inbetween.
+ if (!menu.visualParent.hasAudioStream) {
+ menu.addMenuItem(newSeparator(menu), virtualDesktopsMenuItem);
+ }
// If we don't have a window associated with the player but we can quit
// it through MPRIS we'll offer a "Quit" option instead of "Close"