diff options
| author | xiphon <xiphon@protonmail.com> | 2018-12-13 19:10:20 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2018-12-13 19:10:20 +0000 |
| commit | 9c09294d954d3b609a2d8d82b27be4191724e33a (patch) | |
| tree | df54ff6057f625fa082fe9d0af6cb14ee3727fbf | |
| parent | 59fc48bd8be5e7227ea3d7b571e9e04829e3636d (diff) | |
| download | monzero-gui-9c09294d954d3b609a2d8d82b27be4191724e33a.tar.gz monzero-gui-9c09294d954d3b609a2d8d82b27be4191724e33a.tar.xz monzero-gui-9c09294d954d3b609a2d8d82b27be4191724e33a.zip | |
settings-wallet: use StandardButton instead of custom buttons
| -rw-r--r-- | pages/settings/SettingsWallet.qml | 175 |
1 files changed, 36 insertions, 139 deletions
diff --git a/pages/settings/SettingsWallet.qml b/pages/settings/SettingsWallet.qml index f3cf0a21..d836f632 100644 --- a/pages/settings/SettingsWallet.qml +++ b/pages/settings/SettingsWallet.qml @@ -104,39 +104,13 @@ Rectangle { } } - Rectangle { - Layout.minimumWidth: 120 * scaleRatio - Layout.preferredWidth: closeWalletText.width + (20 * scaleRatio) - Layout.preferredHeight: parent.height - color: "transparent" - - Rectangle{ - width: parent.width - height: 24 * scaleRatio - radius: 2 * scaleRatio - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.buttonBackgroundColorDisabled - - Text { - id: closeWalletText - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.defaultFontColor - font.family: MoneroComponents.Style.fontRegular.name - font.pixelSize: 14 * scaleRatio - font.bold: true - text: qsTr("Close wallet") + translationManager.emptyString - } - - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: { - appWindow.showWizard(); - } - } + MoneroComponents.StandardButton { + small: true + text: qsTr("Close wallet") + translationManager.emptyString + onClicked: { + appWindow.showWizard(); } + width: 135 * scaleRatio } } @@ -195,39 +169,13 @@ Rectangle { } } - Rectangle { - Layout.minimumWidth: 120 * scaleRatio - Layout.preferredWidth: createViewOnlyText.width + (20 * scaleRatio) - Layout.preferredHeight: parent.height - color: "transparent" - - Rectangle{ - width: parent.width - height: 24 * scaleRatio - radius: 2 * scaleRatio - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.buttonBackgroundColorDisabled - - Text { - id: createViewOnlyText - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.defaultFontColor - font.family: MoneroComponents.Style.fontRegular.name - font.pixelSize: 14 * scaleRatio - font.bold: true - text: qsTr("Create wallet") + translationManager.emptyString - } - - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: { - wizard.openCreateViewOnlyWalletPage(); - } - } + MoneroComponents.StandardButton { + small: true + text: qsTr("Create wallet") + translationManager.emptyString + onClicked: { + wizard.openCreateViewOnlyWalletPage(); } + width: 135 * scaleRatio } } @@ -286,37 +234,13 @@ Rectangle { } } - Rectangle { - Layout.minimumWidth: 120 * scaleRatio - Layout.preferredWidth: showSeedText.width + (20 * scaleRatio) - Layout.preferredHeight: parent.height - color: "transparent" - - Rectangle{ - width: parent.width - height: 24 * scaleRatio - radius: 2 * scaleRatio - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.buttonBackgroundColorDisabled - - Text { - id: showSeedText - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.defaultFontColor - font.family: MoneroComponents.Style.fontRegular.name - font.pixelSize: 14 * scaleRatio - font.bold: true - text: qsTr("Show seed") + translationManager.emptyString - } - - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: Utils.showSeedPage(); - } + MoneroComponents.StandardButton { + small: true + text: qsTr("Show seed") + translationManager.emptyString + onClicked: { + Utils.showSeedPage(); } + width: 135 * scaleRatio } } @@ -375,53 +299,26 @@ Rectangle { } } - Rectangle { - Layout.minimumWidth: 120 * scaleRatio - Layout.preferredWidth: rescanButtonText.width + (20 * scaleRatio) - Layout.preferredHeight: parent.height - color: "transparent" - - Rectangle{ - width: parent.width - - height: 24 * scaleRatio - radius: 2 * scaleRatio - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.buttonBackgroundColorDisabled - - Text { - id: rescanButtonText - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: MoneroComponents.Style.defaultFontColor - font.family: MoneroComponents.Style.fontRegular.name - font.pixelSize: 14 * scaleRatio - font.bold: true - text: qsTr("Rescan") + translationManager.emptyString - } - - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: { - if (!currentWallet.rescanSpent()) { - console.error("Error: ", currentWallet.errorString); - informationPopup.title = qsTr("Error") + translationManager.emptyString; - informationPopup.text = qsTr("Error: ") + currentWallet.errorString - informationPopup.icon = StandardIcon.Critical - informationPopup.onCloseCallback = null - informationPopup.open(); - } else { - informationPopup.title = qsTr("Information") + translationManager.emptyString - informationPopup.text = qsTr("Successfully rescanned spent outputs.") + translationManager.emptyString - informationPopup.icon = StandardIcon.Information - informationPopup.onCloseCallback = null - informationPopup.open(); - } - } + MoneroComponents.StandardButton { + small: true + text: qsTr("Rescan") + translationManager.emptyString + onClicked: { + if (!currentWallet.rescanSpent()) { + console.error("Error: ", currentWallet.errorString); + informationPopup.title = qsTr("Error") + translationManager.emptyString; + informationPopup.text = qsTr("Error: ") + currentWallet.errorString + informationPopup.icon = StandardIcon.Critical + informationPopup.onCloseCallback = null + informationPopup.open(); + } else { + informationPopup.title = qsTr("Information") + translationManager.emptyString + informationPopup.text = qsTr("Successfully rescanned spent outputs.") + translationManager.emptyString + informationPopup.icon = StandardIcon.Information + informationPopup.onCloseCallback = null + informationPopup.open(); } } + width: 135 * scaleRatio } } } |
