Commit 701fc52a authored by Nate Graham's avatar Nate Graham
Browse files

effects/desktopgrid: re-add shortcuts to add and remove desktops

This got lost in the QML port.

BUG: 451848
parent 529c3c29
Pipeline #184788 passed with stage
in 13 minutes and 50 seconds
......@@ -33,7 +33,15 @@ Rectangle {
container.organized = false;
}
Keys.onEscapePressed: effect.deactivate(effect.animationDuration);
Keys.onPressed: {
if (event.key == Qt.Key_Escape) {
effect.deactivate(effect.animationDuration);
} else if (event.key == Qt.Key_Plus || event.key == Qt.Key_Equal) {
addButton.clicked();
} else if (event.key == Qt.Key_Minus) {
removeButton.clicked();
}
}
Keys.priority: Keys.AfterItem
KWinComponents.VirtualDesktopModel {
......@@ -167,10 +175,12 @@ Rectangle {
}
visible: container.effect.showAddRemove
PC3.Button {
id: addButton
icon.name: "list-add"
onClicked: container.effect.addDesktop()
}
PC3.Button {
id: removeButton
icon.name: "list-remove"
onClicked: container.effect.removeDesktop()
}
......
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