anchors a page to its container

This commit is contained in:
Marco Martin 2011-11-01 22:45:38 +01:00
parent f6f9c26fdd
commit 5282287b55
2 changed files with 6 additions and 2 deletions

View File

@ -165,6 +165,8 @@ function initPage(page, properties) {
page.pageStack = root; page.pageStack = root;
} }
page.anchors.fill = container
return container; return container;
} }

View File

@ -281,8 +281,9 @@ Item {
{ {
transitionAnimationRunning = true; transitionAnimationRunning = true;
internal.ongoingTransitionCount++; internal.ongoingTransitionCount++;
if (root.visible) if (root.visible) {
internal.setPageStatus(page, (state == "") ? PageStatus.Activating : PageStatus.Deactivating); internal.setPageStatus(page, (state == "") ? PageStatus.Activating : PageStatus.Deactivating);
}
} }
// Called when a transition has ended. // Called when a transition has ended.
@ -449,10 +450,11 @@ Item {
if (owner != container) { if (owner != container) {
// container is not the owner of the page - re-parent back to original owner // container is not the owner of the page - re-parent back to original owner
page.visible = false; page.visible = false;
page.anchors.fill = undefined
page.parent = owner; page.parent = owner;
} }
} }
print("KILLING"+container+" "+page+" "+owner)
container.destroy(); container.destroy();
} }
} }