mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 03:42:05 +02:00
Merge pull request #1817
9c09294
settings-wallet: use StandardButton instead of custom buttons (xiphon)
This commit is contained in:
commit
f463d2c511
@ -104,39 +104,13 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
MoneroComponents.StandardButton {
|
||||||
Layout.minimumWidth: 120 * scaleRatio
|
small: true
|
||||||
Layout.preferredWidth: closeWalletText.width + (20 * scaleRatio)
|
text: qsTr("Close wallet") + translationManager.emptyString
|
||||||
Layout.preferredHeight: parent.height
|
onClicked: {
|
||||||
color: "transparent"
|
appWindow.showWizard();
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
width: 135 * scaleRatio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,39 +169,13 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
MoneroComponents.StandardButton {
|
||||||
Layout.minimumWidth: 120 * scaleRatio
|
small: true
|
||||||
Layout.preferredWidth: createViewOnlyText.width + (20 * scaleRatio)
|
text: qsTr("Create wallet") + translationManager.emptyString
|
||||||
Layout.preferredHeight: parent.height
|
onClicked: {
|
||||||
color: "transparent"
|
wizard.openCreateViewOnlyWalletPage();
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
width: 135 * scaleRatio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,37 +234,13 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
MoneroComponents.StandardButton {
|
||||||
Layout.minimumWidth: 120 * scaleRatio
|
small: true
|
||||||
Layout.preferredWidth: showSeedText.width + (20 * scaleRatio)
|
text: qsTr("Show seed") + translationManager.emptyString
|
||||||
Layout.preferredHeight: parent.height
|
onClicked: {
|
||||||
color: "transparent"
|
Utils.showSeedPage();
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
width: 135 * scaleRatio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,53 +299,26 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
MoneroComponents.StandardButton {
|
||||||
Layout.minimumWidth: 120 * scaleRatio
|
small: true
|
||||||
Layout.preferredWidth: rescanButtonText.width + (20 * scaleRatio)
|
text: qsTr("Rescan") + translationManager.emptyString
|
||||||
Layout.preferredHeight: parent.height
|
onClicked: {
|
||||||
color: "transparent"
|
if (!currentWallet.rescanSpent()) {
|
||||||
|
console.error("Error: ", currentWallet.errorString);
|
||||||
Rectangle{
|
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||||
width: parent.width
|
informationPopup.text = qsTr("Error: ") + currentWallet.errorString
|
||||||
|
informationPopup.icon = StandardIcon.Critical
|
||||||
height: 24 * scaleRatio
|
informationPopup.onCloseCallback = null
|
||||||
radius: 2 * scaleRatio
|
informationPopup.open();
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
} else {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
informationPopup.title = qsTr("Information") + translationManager.emptyString
|
||||||
color: MoneroComponents.Style.buttonBackgroundColorDisabled
|
informationPopup.text = qsTr("Successfully rescanned spent outputs.") + translationManager.emptyString
|
||||||
|
informationPopup.icon = StandardIcon.Information
|
||||||
Text {
|
informationPopup.onCloseCallback = null
|
||||||
id: rescanButtonText
|
informationPopup.open();
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
width: 135 * scaleRatio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user