mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
wizard: fix mode selection back button
This commit is contained in:
parent
500c7ec82e
commit
3c6a1e45d7
3 changed files with 6 additions and 15 deletions
|
@ -82,7 +82,6 @@ Rectangle {
|
||||||
|
|
||||||
property var m_wallet;
|
property var m_wallet;
|
||||||
property alias wizardState: wizardStateView.state
|
property alias wizardState: wizardStateView.state
|
||||||
property alias wizardStatePrevious: wizardStateView.previousView
|
|
||||||
property alias wizardStackView: stackView
|
property alias wizardStackView: stackView
|
||||||
property int wizardSubViewWidth: 780
|
property int wizardSubViewWidth: 780
|
||||||
property int wizardSubViewTopMargin: persistentSettings.customDecorations ? 90 : 32
|
property int wizardSubViewTopMargin: persistentSettings.customDecorations ? 90 : 32
|
||||||
|
@ -148,19 +147,9 @@ Rectangle {
|
||||||
property WizardModeBootstrap wizardModeBootstrapView: WizardModeBootstrap {}
|
property WizardModeBootstrap wizardModeBootstrapView: WizardModeBootstrap {}
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
signal previousClicked;
|
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
state: ''
|
state: ''
|
||||||
|
|
||||||
onPreviousClicked: {
|
|
||||||
if (previousView && previousView.viewName != null){
|
|
||||||
state = previousView.viewName;
|
|
||||||
} else {
|
|
||||||
state = "wizardHome";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCurrentViewChanged: {
|
onCurrentViewChanged: {
|
||||||
if (previousView) {
|
if (previousView) {
|
||||||
if (typeof previousView.onPageClosed === "function") {
|
if (typeof previousView.onPageClosed === "function") {
|
||||||
|
|
|
@ -141,10 +141,11 @@ Rectangle {
|
||||||
btnPrevText: qsTr("Back to menu") + translationManager.emptyString
|
btnPrevText: qsTr("Back to menu") + translationManager.emptyString
|
||||||
btnNext.visible: false
|
btnNext.visible: false
|
||||||
progressSteps: 0
|
progressSteps: 0
|
||||||
|
autoTransition: false
|
||||||
|
|
||||||
onPrevClicked: {
|
onPrevClicked: {
|
||||||
wizardController.wizardStackView.backTransition = wizardController.wizardStatePrevious.viewName == 'wizardLanguage';
|
wizardController.wizardStackView.backTransition = !wizardController.wizardStackView.backTransition;
|
||||||
wizardController.wizardState = wizardController.wizardStatePrevious.viewName == 'wizardLanguage' ? 'wizardLanguage' : 'wizardHome';
|
wizardController.wizardState = wizardController.wizardStackView.backTransition ? 'wizardLanguage' : 'wizardHome';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ GridLayout {
|
||||||
property alias progressEnabled: wizardProgress.visible
|
property alias progressEnabled: wizardProgress.visible
|
||||||
property int progressSteps: 0
|
property int progressSteps: 0
|
||||||
property int progress: 0
|
property int progress: 0
|
||||||
|
property bool autoTransition: true
|
||||||
property alias btnPrev: btnPrev
|
property alias btnPrev: btnPrev
|
||||||
property alias btnNext: btnNext
|
property alias btnNext: btnNext
|
||||||
property string btnPrevText: qsTr("Previous") + translationManager.emptyString
|
property string btnPrevText: qsTr("Previous") + translationManager.emptyString
|
||||||
|
@ -55,11 +56,11 @@ GridLayout {
|
||||||
signal m_prevClicked;
|
signal m_prevClicked;
|
||||||
|
|
||||||
onM_prevClicked: {
|
onM_prevClicked: {
|
||||||
wizardController.wizardStackView.backTransition = true;
|
if (autoTransition) wizardController.wizardStackView.backTransition = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onM_nextClicked: {
|
onM_nextClicked: {
|
||||||
wizardController.wizardStackView.backTransition = false;
|
if (autoTransition) wizardController.wizardStackView.backTransition = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
Loading…
Reference in a new issue