anchors a page to its container
This commit is contained in:
parent
f6f9c26fdd
commit
5282287b55
@ -165,6 +165,8 @@ function initPage(page, properties) {
|
|||||||
page.pageStack = root;
|
page.pageStack = root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
page.anchors.fill = container
|
||||||
|
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user