Commit 3c70f04e authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Fix drag cursor

The MouseArea for allowing middle click to mute overrules the cursorShape of the draggable area.
By moving the middle click area to the right of the icon, we avoid this and can change the cursor to an open hand when hovering
the icon to indicate something draggable. The drag area can still be middle clicked to mute.

Differential Revision: https://phabricator.kde.org/D10098
parent 12c5c46a
......@@ -87,7 +87,13 @@ PlasmaComponents.ListItem {
MouseArea {
anchors.fill: parent
cursorShape: dragArea.enabled ? (pressed ? Qt.ClosedHandCursor : Qt.OpenHandCursor) : undefined
cursorShape: dragArea.enabled ? (pressed && pressedButtons === Qt.LeftButton ? Qt.ClosedHandCursor : Qt.OpenHandCursor) : undefined
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
onClicked: {
if (mouse.button === Qt.MiddleButton) {
Muted = !Muted;
}
}
}
}
}
......@@ -226,7 +232,10 @@ PlasmaComponents.ListItem {
}
MouseArea {
anchors.fill: parent
anchors {
fill: parent
leftMargin: clientIcon.width
}
acceptedButtons: Qt.MiddleButton
onClicked: Muted = !Muted
}
......
Markdown is supported
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