Use a Loader instead of StackView for pageStack

This commit is contained in:
miruka
2019-08-19 15:37:48 -04:00
parent 99bbe7f3ee
commit 109082c8d8
11 changed files with 28 additions and 23 deletions

View File

@@ -42,7 +42,7 @@ HPage {
Layout.maximumWidth: Math.min(parent.width, 640)
Layout.preferredWidth:
pageStack.isWide ? parent.width : avatarPreferredSize
pageLoader.isWide ? parent.width : avatarPreferredSize
Layout.preferredHeight: childrenRect.height

View File

@@ -24,7 +24,7 @@ HColumnLayout {
"rooms can be exported to a passphrase-protected file.%1" +
"You will then be able to import this file in another " +
"Matrix client."
).arg(pageStack.isWide ? "\n" :"\n\n")
).arg(pageLoader.isWide ? "\n" :"\n\n")
Layout.fillWidth: true
Layout.margins: currentSpacing

View File

@@ -46,7 +46,7 @@ HGridLayout {
}
columns: 2
flow: pageStack.isWide ? GridLayout.LeftToRight : GridLayout.TopToBottom
flow: pageLoader.isWide ? GridLayout.LeftToRight : GridLayout.TopToBottom
rowSpacing: currentSpacing
Component.onCompleted: nameField.field.forceActiveFocus()

View File

@@ -41,7 +41,7 @@ HPage {
(rememberAccount.checked ? "add": "delete"),
[data]
)
pageStack.showPage(
pageLoader.showPage(
"EditAccount/EditAccount", {userId: data}
)