support close button for activity switcher
This commit is contained in:
parent
177f000c66
commit
7edc668961
@ -18,7 +18,19 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: "red"
|
||||
signal closed()
|
||||
|
||||
PlasmaComponents.ToolButton {
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
}
|
||||
iconSource: "window-close"
|
||||
onClicked: root.closed()
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,8 @@ Rectangle {
|
||||
if (sidePanelStack.state == "activityManager") {
|
||||
sidePanelStack.state = "closed";
|
||||
} else {
|
||||
sidePanelStack.push(Qt.resolvedUrl("../activitymanager/ActivityManager.qml"));
|
||||
var page = sidePanelStack.push(Qt.resolvedUrl("../activitymanager/ActivityManager.qml"));
|
||||
page.closed.connect(function(){sidePanelStack.state = "closed";});
|
||||
sidePanelStack.state = "activityManager";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user