From 8abf8f844fed1fdc396effe3c029752e64fa4747 Mon Sep 17 00:00:00 2001 From: selsta Date: Wed, 24 Jul 2019 05:07:54 +0200 Subject: [PATCH] wizard: bug fixes - property binding loop - wrong transition - html in plaintext --- wizard/WizardController.qml | 30 +++++++++++++------------- wizard/WizardCreateDevice1.qml | 2 ++ wizard/WizardCreateWallet1.qml | 2 ++ wizard/WizardCreateWallet2.qml | 2 ++ wizard/WizardCreateWallet3.qml | 2 ++ wizard/WizardCreateWallet4.qml | 2 ++ wizard/WizardHome.qml | 3 ++- wizard/WizardLanguage.qml | 3 ++- wizard/WizardModeBootstrap.qml | 6 ++++-- wizard/WizardModeRemoteNodeWarning.qml | 2 ++ wizard/WizardModeSelection.qml | 4 ++++ wizard/WizardOpenWallet1.qml | 2 ++ wizard/WizardRestoreWallet1.qml | 2 ++ wizard/WizardRestoreWallet2.qml | 2 ++ wizard/WizardRestoreWallet3.qml | 2 ++ wizard/WizardRestoreWallet4.qml | 2 ++ 16 files changed, 49 insertions(+), 19 deletions(-) diff --git a/wizard/WizardController.qml b/wizard/WizardController.qml index cf8984a5..c62a327f 100644 --- a/wizard/WizardController.qml +++ b/wizard/WizardController.qml @@ -194,63 +194,63 @@ Rectangle { State { name: "wizardLanguage" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardLanguageView } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardLanguageView.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardLanguageView.pageHeight + 80 } }, State { name: "wizardHome" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardHomeView } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardHomeView.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardHomeView.pageHeight + 80 } }, State { name: "wizardCreateWallet1" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardCreateWallet1View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet1View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet1View.pageHeight + 80 } }, State { name: "wizardCreateWallet2" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardCreateWallet2View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet2View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet2View.pageHeight + 80 } }, State { name: "wizardCreateWallet3" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardCreateWallet3View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet3View.height + wizardController.flickableHeightMargin + 400 } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet3View.pageHeight + 80 } }, State { name: "wizardCreateWallet4" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardCreateWallet4View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet4View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet4View.pageHeight + 80 } }, State { name: "wizardRestoreWallet1" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardRestoreWallet1View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet1View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet1View.pageHeight + 80 } }, State { name: "wizardRestoreWallet2" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardRestoreWallet2View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet2View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet2View.pageHeight + 80 } }, State { name: "wizardRestoreWallet3" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardRestoreWallet3View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet3View.childrenRect.height + wizardController.flickableHeightMargin + 400 } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet3View.pageHeight + 80 } }, State { name: "wizardRestoreWallet4" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardRestoreWallet4View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet4View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet4View.pageHeight + 80 } }, State { name: "wizardCreateDevice1" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardCreateDevice1View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateDevice1View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateDevice1View.pageHeight + 80 } }, State { name: "wizardOpenWallet1" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardOpenWallet1View } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardOpenWallet1View.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardOpenWallet1View.pageHeight + 80 } }, State { name: "wizardModeSelection" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardModeSelectionView } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardModeSelectionView.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardModeSelectionView.pageHeight + 80 } }, State { name: "wizardModeRemoteNodeWarning" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardModeRemoteNodeWarningView } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardModeRemoteNodeWarningView.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardModeRemoteNodeWarningView.pageHeight + 80 } }, State { name: "wizardModeBootstrap" PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardModeBootstrapView } - PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardModeBootstrapView.childrenRect.height + wizardController.flickableHeightMargin } + PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardModeBootstrapView.pageHeight + 80 } } ] diff --git a/wizard/WizardCreateDevice1.qml b/wizard/WizardCreateDevice1.qml index 21fc5a9a..270ae298 100644 --- a/wizard/WizardCreateDevice1.qml +++ b/wizard/WizardCreateDevice1.qml @@ -41,6 +41,7 @@ Rectangle { id: wizardCreateDevice1 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardCreateDevice1" property var deviceName: deviceNameModel.get(deviceNameDropdown.currentIndex).column2 @@ -58,6 +59,7 @@ Rectangle { } ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardCreateWallet1.qml b/wizard/WizardCreateWallet1.qml index f5090114..3e84ce17 100644 --- a/wizard/WizardCreateWallet1.qml +++ b/wizard/WizardCreateWallet1.qml @@ -39,10 +39,12 @@ Rectangle { id: wizardCreateWallet1 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardCreateWallet1" property alias seed: seed ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardCreateWallet2.qml b/wizard/WizardCreateWallet2.qml index e921dc04..7c698ee9 100644 --- a/wizard/WizardCreateWallet2.qml +++ b/wizard/WizardCreateWallet2.qml @@ -36,9 +36,11 @@ Rectangle { id: wizardCreateWallet2 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardCreateWallet2" ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardCreateWallet3.qml b/wizard/WizardCreateWallet3.qml index aa48bce1..0ef3f1ce 100644 --- a/wizard/WizardCreateWallet3.qml +++ b/wizard/WizardCreateWallet3.qml @@ -36,9 +36,11 @@ Rectangle { id: wizardCreateWallet3 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardCreateWallet3" ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardCreateWallet4.qml b/wizard/WizardCreateWallet4.qml index 785ec8c4..e24dc0c3 100644 --- a/wizard/WizardCreateWallet4.qml +++ b/wizard/WizardCreateWallet4.qml @@ -37,9 +37,11 @@ Rectangle { id: wizardCreateWallet4 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardCreateWallet4" ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardHome.qml b/wizard/WizardHome.qml index 2a38f3f7..05460805 100644 --- a/wizard/WizardHome.qml +++ b/wizard/WizardHome.qml @@ -37,10 +37,11 @@ import "../components" as MoneroComponents Rectangle { id: wizardHome color: "transparent" - + property alias pageHeight: pageRoot.height property string viewName: "wizardHome" ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardLanguage.qml b/wizard/WizardLanguage.qml index d19f2bae..f09215df 100644 --- a/wizard/WizardLanguage.qml +++ b/wizard/WizardLanguage.qml @@ -39,10 +39,11 @@ Rectangle { Layout.fillWidth: true color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardLanguage" ColumnLayout { - id: root + id: pageRoot anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right diff --git a/wizard/WizardModeBootstrap.qml b/wizard/WizardModeBootstrap.qml index ecda1b40..ba911d63 100644 --- a/wizard/WizardModeBootstrap.qml +++ b/wizard/WizardModeBootstrap.qml @@ -37,10 +37,12 @@ Rectangle { id: wizardModeBootstrapWarning color: "transparent" - property string viewName: "wizardModeRemoteNodeWarning" + property alias pageHeight: pageRoot.height + property string viewName: "wizardModeBootstrap" property bool understood: false ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true @@ -79,7 +81,7 @@ Rectangle { } MoneroComponents.TextPlain { - text: qsTr("Temporary use of remote nodes is useful in order to use Monero immediately (hence the name bootstrap), however be aware that when using remote nodes (including with the bootstrap setting), nodes could track your IP address, track your \"restore height\" and associated block request data, and send you inaccurate information to learn more about transactions you make.") + translationManager.emptyString + text: qsTr("Temporary use of remote nodes is useful in order to use Monero immediately (hence the name bootstrap), however be aware that when using remote nodes (including with the bootstrap setting), nodes could track your IP address, track your \"restore height\" and associated block request data, and send you inaccurate information to learn more about transactions you make.") + translationManager.emptyString wrapMode: Text.Wrap Layout.topMargin: 8 Layout.fillWidth: true diff --git a/wizard/WizardModeRemoteNodeWarning.qml b/wizard/WizardModeRemoteNodeWarning.qml index 3fd9325d..d6c2dd1d 100644 --- a/wizard/WizardModeRemoteNodeWarning.qml +++ b/wizard/WizardModeRemoteNodeWarning.qml @@ -37,10 +37,12 @@ Rectangle { id: wizardModeRemoteNodeWarning color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardModeRemoteNodeWarning" property bool understood: false ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardModeSelection.qml b/wizard/WizardModeSelection.qml index 8d1a93fb..1eb3320f 100644 --- a/wizard/WizardModeSelection.qml +++ b/wizard/WizardModeSelection.qml @@ -38,9 +38,11 @@ Rectangle { id: wizardModeSelection1 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardModeSelection1" ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true @@ -77,6 +79,7 @@ Rectangle { onMenuClicked: { if(appWindow.persistentSettings.nettype == 0){ appWindow.changeWalletMode(0); + wizardController.wizardStackView.backTransition = false; wizardController.wizardState = 'wizardModeRemoteNodeWarning'; } } @@ -106,6 +109,7 @@ Rectangle { onMenuClicked: { if(appWindow.persistentSettings.nettype == 0){ appWindow.changeWalletMode(1); + wizardController.wizardStackView.backTransition = false; wizardController.wizardState = 'wizardModeBootstrap'; } } diff --git a/wizard/WizardOpenWallet1.qml b/wizard/WizardOpenWallet1.qml index 50823a37..4d4d1ed7 100644 --- a/wizard/WizardOpenWallet1.qml +++ b/wizard/WizardOpenWallet1.qml @@ -43,10 +43,12 @@ Rectangle { id: wizardOpenWallet1 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardOpenWallet1" property int walletCount: walletKeysFilesModel.rowCount() ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardRestoreWallet1.qml b/wizard/WizardRestoreWallet1.qml index c626742f..8e71b900 100644 --- a/wizard/WizardRestoreWallet1.qml +++ b/wizard/WizardRestoreWallet1.qml @@ -38,6 +38,7 @@ Rectangle { id: wizardRestoreWallet1 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardRestoreWallet1" function verify() { @@ -88,6 +89,7 @@ Rectangle { } ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardRestoreWallet2.qml b/wizard/WizardRestoreWallet2.qml index e69df489..161421c7 100644 --- a/wizard/WizardRestoreWallet2.qml +++ b/wizard/WizardRestoreWallet2.qml @@ -38,10 +38,12 @@ Rectangle { id: wizardRestoreWallet2 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardRestoreWallet2" property int recoveryMode: 1 ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardRestoreWallet3.qml b/wizard/WizardRestoreWallet3.qml index c51225be..73874f4f 100644 --- a/wizard/WizardRestoreWallet3.qml +++ b/wizard/WizardRestoreWallet3.qml @@ -38,6 +38,7 @@ Rectangle { id: wizardRestoreWallet3 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardRestoreWallet3" property int recoveryMode: 1 @@ -47,6 +48,7 @@ Rectangle { } ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true diff --git a/wizard/WizardRestoreWallet4.qml b/wizard/WizardRestoreWallet4.qml index 4b63ea38..ac552b37 100644 --- a/wizard/WizardRestoreWallet4.qml +++ b/wizard/WizardRestoreWallet4.qml @@ -37,9 +37,11 @@ Rectangle { id: wizardRestoreWallet4 color: "transparent" + property alias pageHeight: pageRoot.height property string viewName: "wizardRestoreWallet4" ColumnLayout { + id: pageRoot Layout.alignment: Qt.AlignHCenter; width: parent.width - 100 Layout.fillWidth: true