aboutsummaryrefslogtreecommitdiff
path: root/wizard/WizardController.qml
diff options
context:
space:
mode:
authordsc <xmrdsc@protonmail.com>2019-04-15 04:59:04 +0200
committerdsc <xmrdsc@protonmail.com>2019-04-26 01:53:42 +0200
commite84f4623d89d91d889562f6403c65207b2c4b164 (patch)
treebdc35a7c99f641db1cf2db17517334c1f76cca6f /wizard/WizardController.qml
parente81cb7e64090f66e72d942b048b69505e490f5c0 (diff)
downloadmonzero-gui-e84f4623d89d91d889562f6403c65207b2c4b164.tar.gz
monzero-gui-e84f4623d89d91d889562f6403c65207b2c4b164.tar.xz
monzero-gui-e84f4623d89d91d889562f6403c65207b2c4b164.zip
Back transitions for the wizards
Diffstat (limited to 'wizard/WizardController.qml')
-rw-r--r--wizard/WizardController.qml15
1 files changed, 7 insertions, 8 deletions
diff --git a/wizard/WizardController.qml b/wizard/WizardController.qml
index daf3816f..c1fccc81 100644
--- a/wizard/WizardController.qml
+++ b/wizard/WizardController.qml
@@ -76,6 +76,7 @@ Rectangle {
property var m_wallet;
property alias wizardState: wizardStateView.state
property alias wizardStatePrevious: wizardStateView.previousView
+ property alias wizardStackView: stackView
property int wizardSubViewWidth: 780
property int wizardSubViewTopMargin: persistentSettings.customDecorations ? 90 : 32
property bool skipModeSelection: false
@@ -161,9 +162,6 @@ Rectangle {
if (typeof previousView.onPageClosed === "function") {
previousView.onPageClosed();
}
-
- // Combined with NumberAnimation to fade out views
- previousView.opacity = 0;
}
if (currentView) {
@@ -172,12 +170,13 @@ Rectangle {
if (typeof currentView.onPageCompleted === "function") {
currentView.onPageCompleted(previousView);
}
-
- // Combined with NumberAnimation to fade in views
- currentView.opacity = 1;
}
previousView = currentView;
+
+ // reset push direction
+ if(wizardController.wizardState == "wizardHome")
+ wizardController.wizardStackView.backTransition = false;
}
states: [
@@ -286,7 +285,7 @@ Rectangle {
PropertyAnimation {
target: enterItem
property: "x"
- from: target.width
+ from: stackView.backTransition ? -target.width : target.width
to: 0
duration: 300
easing.type: Easing.OutCubic
@@ -295,7 +294,7 @@ Rectangle {
target: exitItem
property: "x"
from: 0
- to: 0 - target.width
+ to: stackView.backTransition ? target.width : -target.width
duration: 300
easing.type: Easing.OutCubic
}