Merge pull request #1817

9c09294 settings-wallet: use StandardButton instead of custom buttons (xiphon)
This commit is contained in:
luigi1111 2018-12-18 09:34:04 -06:00
commit f463d2c511
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -104,39 +104,13 @@ Rectangle {
} }
} }
Rectangle { MoneroComponents.StandardButton {
Layout.minimumWidth: 120 * scaleRatio small: true
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 text: qsTr("Close wallet") + translationManager.emptyString
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: { onClicked: {
appWindow.showWizard(); appWindow.showWizard();
} }
} width: 135 * scaleRatio
}
} }
} }
@ -195,39 +169,13 @@ Rectangle {
} }
} }
Rectangle { MoneroComponents.StandardButton {
Layout.minimumWidth: 120 * scaleRatio small: true
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 text: qsTr("Create wallet") + translationManager.emptyString
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: { onClicked: {
wizard.openCreateViewOnlyWalletPage(); wizard.openCreateViewOnlyWalletPage();
} }
} width: 135 * scaleRatio
}
} }
} }
@ -286,37 +234,13 @@ Rectangle {
} }
} }
Rectangle { MoneroComponents.StandardButton {
Layout.minimumWidth: 120 * scaleRatio small: true
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 text: qsTr("Show seed") + translationManager.emptyString
onClicked: {
Utils.showSeedPage();
} }
width: 135 * scaleRatio
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: Utils.showSeedPage();
}
}
} }
} }
@ -375,35 +299,9 @@ Rectangle {
} }
} }
Rectangle { MoneroComponents.StandardButton {
Layout.minimumWidth: 120 * scaleRatio small: true
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 text: qsTr("Rescan") + translationManager.emptyString
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: { onClicked: {
if (!currentWallet.rescanSpent()) { if (!currentWallet.rescanSpent()) {
console.error("Error: ", currentWallet.errorString); console.error("Error: ", currentWallet.errorString);
@ -420,8 +318,7 @@ Rectangle {
informationPopup.open(); informationPopup.open();
} }
} }
} width: 135 * scaleRatio
}
} }
} }
} }