From d10ce1744c002e9a8408ef391ec51a15122b1f18 Mon Sep 17 00:00:00 2001 From: mmbyday Date: Thu, 13 Dec 2018 12:04:02 -0800 Subject: [PATCH] SettingsInfo: use MoneroComponents.StandardButton :lipstick: --- pages/settings/SettingsInfo.qml | 101 ++++++++++++-------------------- 1 file changed, 36 insertions(+), 65 deletions(-) diff --git a/pages/settings/SettingsInfo.qml b/pages/settings/SettingsInfo.qml index 75e96da9..6cec2e04 100644 --- a/pages/settings/SettingsInfo.qml +++ b/pages/settings/SettingsInfo.qml @@ -37,7 +37,7 @@ import "../../components" as MoneroComponents Rectangle { color: "transparent" - height: 1400 + height: 1400 * scaleRatio Layout.fillWidth: true ColumnLayout { @@ -48,19 +48,19 @@ Rectangle { anchors.right: parent.right anchors.margins: (isMobile)? 17 : 20 anchors.topMargin: 0 - spacing: 30 + spacing: 30 * scaleRatio GridLayout { columns: 2 columnSpacing: 0 MoneroComponents.TextBlock { - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio text: qsTr("GUI version: ") + translationManager.emptyString } MoneroComponents.TextBlock { - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio text: Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")" + translationManager.emptyString } @@ -84,12 +84,12 @@ Rectangle { MoneroComponents.TextBlock { id: guiMoneroVersion - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio text: qsTr("Embedded Monero version: ") + translationManager.emptyString } MoneroComponents.TextBlock { - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio text: Version.GUI_MONERO_VERSION + translationManager.emptyString } @@ -113,14 +113,14 @@ Rectangle { MoneroComponents.TextBlock { Layout.fillWidth: true - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio text: qsTr("Wallet path: ") + translationManager.emptyString } MoneroComponents.TextBlock { Layout.fillWidth: true - Layout.maximumWidth: 360 - font.pixelSize: 14 + Layout.maximumWidth: 360 * scaleRatio + font.pixelSize: 14 * scaleRatio text: { var wallet_path = walletPath(); if(isIOS) @@ -149,7 +149,7 @@ Rectangle { MoneroComponents.TextBlock { id: restoreHeight - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio textFormat: Text.RichText text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet creation height: ") + translationManager.emptyString } @@ -158,7 +158,7 @@ Rectangle { id: restoreHeightText Layout.fillWidth: true textFormat: Text.RichText - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio font.bold: true property var style: "" text: (currentWallet ? currentWallet.walletCreationHeight : "") + style + qsTr(" (Click to change)") + translationManager.emptyString @@ -230,71 +230,42 @@ Rectangle { MoneroComponents.TextBlock { Layout.fillWidth: true - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio text: qsTr("Wallet log path: ") + translationManager.emptyString } MoneroComponents.TextBlock { Layout.fillWidth: true - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio text: walletLogPath } } // Copy info to clipboard - Rectangle { - color: "transparent" - Layout.preferredHeight: 24 * scaleRatio - Layout.fillWidth: true - - Rectangle { - id: rectCopy - color: MoneroComponents.Style.buttonBackgroundColorDisabled - width: btnCopy.width + 40 - height: 24 - radius: 2 - - Text { - id: btnCopy - 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("Copy to clipboard") + translationManager.emptyString - } - - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: { - var data = ""; - data += "GUI version: " + Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")"; - data += "\nEmbedded Monero version: " + Version.GUI_MONERO_VERSION; - data += "\nWallet path: "; - - var wallet_path = walletPath(); - if(isIOS) - wallet_path = moneroAccountsDir + wallet_path; - data += wallet_path; - - data += "\nWallet creation height: "; - if(currentWallet) - data += currentWallet.walletCreationHeight; - - data += "\nWallet log path: " + walletLogPath; - - console.log("Copied to clipboard"); - clipboard.setText(data); - appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3); - } - } + MoneroComponents.StandardButton { + small: true + text: qsTr("Copy to clipboard") + translationManager.emptyString + onClicked: { + var data = ""; + data += "GUI version: " + Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")"; + data += "\nEmbedded Monero version: " + Version.GUI_MONERO_VERSION; + data += "\nWallet path: "; + + var wallet_path = walletPath(); + if(isIOS) + wallet_path = moneroAccountsDir + wallet_path; + data += wallet_path; + + data += "\nWallet creation height: "; + if(currentWallet) + data += currentWallet.walletCreationHeight; + + data += "\nWallet log path: " + walletLogPath; + + console.log("Copied to clipboard"); + clipboard.setText(data); + appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3); } } } - - Component.onCompleted: { - - } }