central button shows desktop

This commit is contained in:
Marco Martin 2015-06-09 11:39:42 -07:00
parent 5f412e8b75
commit 4993e73cfa
3 changed files with 10 additions and 3 deletions

View file

@ -32,7 +32,9 @@ Item {
} }
function closeWindowList() { function closeWindowList() {
mainItemLoader.item.closeWindowList() if (mainItemLoader.item) {
mainItemLoader.item.closeWindowList()
}
} }
Loader { Loader {

View file

@ -40,12 +40,16 @@ PlasmaCore.Dialog {
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
iconSource: "go-home" iconSource: "go-home"
onClicked: root.closeWindowList(); onClicked: {
root.closeWindowList();
workspace.slotToggleShowDesktop();
}
} }
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
anchors.right: parent.right anchors.right: parent.right
iconSource: "window-close" iconSource: "window-close"
enabled: workspace.activeClient
onClicked: workspace.activeClient.closeWindow(); onClicked: workspace.activeClient.closeWindow();
} }
} }

View file

@ -40,9 +40,10 @@ PlasmaCore.Dialog {
showAnim.running = true; showAnim.running = true;
} }
} }
mainItem: Item { mainItem: Rectangle {
width: workspace.virtualScreenSize.width width: workspace.virtualScreenSize.width
height: workspace.virtualScreenSize.height height: workspace.virtualScreenSize.height
color: Qt.rgba(0, 0, 0, 0.5)
SequentialAnimation { SequentialAnimation {
id: hideAnim id: hideAnim