Commit 6bebee67 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Indicate when application is "corked"

When a stream is present but not playing anything ("corked"),
show a "paused" icon over the application.

BUG: 398476
FIXED-IN: 5.23.0
parent 66e97be2
......@@ -59,6 +59,24 @@ PlasmaComponents.ListItem {
}
}
PlasmaCore.IconItem {
anchors {
right: parent.right
bottom: parent.bottom
margins: PlasmaCore.Units.smallSpacing
}
width: PlasmaCore.Units.iconSizes.small
height: width
source: item.type === "sink-input" || item.type === "source-output" ? "emblem-pause" : ""
visible: valid && Corked
PlasmaComponents3.ToolTip {
visible: parent.visible && dragMouseArea.containsMouse
text: item.type === "source-output" ? i18n("Currently not recording")
: i18n("Currently not playing")
}
}
DragAndDrop.DragArea {
id: dragArea
anchors.fill: parent
......@@ -79,9 +97,11 @@ PlasmaComponents.ListItem {
}
MouseArea {
id: dragMouseArea
anchors.fill: parent
cursorShape: dragArea.enabled ? (pressed && pressedButtons === Qt.LeftButton ? Qt.ClosedHandCursor : Qt.OpenHandCursor) : undefined
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
hoverEnabled: true
onClicked: {
if (mouse.button === Qt.MiddleButton) {
Muted = !Muted;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment