use a Loader

This commit is contained in:
Marco Martin 2013-10-23 13:34:33 +02:00
parent 3665e3b382
commit 5e29c61fb7

View File

@ -34,10 +34,10 @@ Rectangle {
console.log("Activity manger toggled"); console.log("Activity manger toggled");
if (sidePanel.visible) { if (sidePanel.visible) {
sidePanelStack.pop(); sidePanelStack.source = '';
sidePanel.visible = false; sidePanel.visible = false;
} else { } else {
sidePanelStack.push(Qt.resolvedUrl("../activityswitcher/ActivitySwitcher.qml")) sidePanelStack.source = Qt.resolvedUrl("../activityswitcher/ActivitySwitcher.qml");
sidePanel.visible = true; sidePanel.visible = true;
sidePanel.height = containment.availableScreenRegion(containment.screen)[0].height; sidePanel.height = containment.availableScreenRegion(containment.screen)[0].height;
} }
@ -46,7 +46,7 @@ Rectangle {
PlasmaCore.Dialog { PlasmaCore.Dialog {
id: sidePanel id: sidePanel
location: PlasmaCore.Types.LeftEdge location: PlasmaCore.Types.LeftEdge
mainItem: PlasmaComponents.PageStack { mainItem: Loader {
id: sidePanelStack id: sidePanelStack
width: 250 width: 250
height: 500 height: 500