diff options
| author | Sander Ferdinand <sa.ferdinand@gmail.com> | 2018-03-22 05:07:09 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-03-29 23:04:03 +0100 |
| commit | 625b92318fbe14e06eedb8537a1eabceb4c8a319 (patch) | |
| tree | ec1d3cbeb631502432d1d18af20c0e28ca956e78 | |
| parent | b38ee48e594e4cc19299afd4c888f39075688101 (diff) | |
| download | monzero-gui-625b92318fbe14e06eedb8537a1eabceb4c8a319.tar.gz monzero-gui-625b92318fbe14e06eedb8537a1eabceb4c8a319.tar.xz monzero-gui-625b92318fbe14e06eedb8537a1eabceb4c8a319.zip | |
Restyled warning box (not connected to daemon)
| -rw-r--r-- | components/LineEdit.qml | 4 | ||||
| -rwxr-xr-x | images/warning.png | bin | 0 -> 19517 bytes | |||
| -rw-r--r-- | pages/History.qml | 2 | ||||
| -rw-r--r-- | pages/Transfer.qml | 81 | ||||
| -rw-r--r-- | qml.qrc | 1 |
5 files changed, 60 insertions, 28 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml index f5e8a478..9afb5ebc 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -78,9 +78,9 @@ Item { onTextUpdated: { // check to remove placeholder text when there is content if(item.isEmpty()){ - placeholderLabel.visible = true + placeholderLabel.visible = true; } else { - placeholderLabel.visible = false + placeholderLabel.visible = false; } } diff --git a/images/warning.png b/images/warning.png Binary files differnew file mode 100755 index 00000000..8036d84a --- /dev/null +++ b/images/warning.png diff --git a/pages/History.qml b/pages/History.qml index f6fe8736..f9855189 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -274,7 +274,7 @@ Rectangle { Label { fontSize: 16 * scaleRatio - text: qsTr("No history yet...") + translationManager.emptyString + text: qsTr("No history...") + translationManager.emptyString } } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index fa33c49b..f4020984 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -122,6 +122,51 @@ Rectangle { spacing: 30 * scaleRatio + RowLayout{ + visible: warningText.text !== "" + + Rectangle { + id: statusRect + Layout.preferredHeight: warningText.height + 40 + Layout.fillWidth: true + + radius: 2 + border.color: Qt.rgba(255, 255, 255, 0.25) + border.width: 1 + color: "transparent" + + GridLayout{ + Layout.fillWidth: true + Layout.preferredHeight: warningText.height + 40 + + Image { + anchors.verticalCenter: statusRect.verticalCenter + Layout.preferredHeight: 33 + Layout.preferredWidth: 33 + Layout.leftMargin: 10 + Layout.topMargin: 10 + source: "../images/warning.png" + } + + Text { + id: warningText + Layout.topMargin: 12 * scaleRatio + Layout.preferredWidth: statusRect.width - 80 + Layout.leftMargin: 6 + text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString + wrapMode: Text.Wrap + font.family: Style.fontRegular + font.pixelSize: 14 * scaleRatio + color: Style.defaultFontColor + textFormat: Text.RichText + onLinkActivated: { + appWindow.startDaemon(appWindow.persistentSettings.daemonFlags); + } + } + } + } + } + GridLayout { columns: (isMobile)? 1 : 2 Layout.fillWidth: true @@ -131,8 +176,9 @@ Rectangle { Layout.fillWidth: true RowLayout { - Layout.fillWidth: true id: amountRow + + Layout.fillWidth: true Layout.minimumWidth: 200 // Amount input @@ -145,6 +191,7 @@ Rectangle { width: 100 inlineButtonText: qsTr("All") + translationManager.emptyString inlineButton.onClicked: amountLine.text = "(all)" + validator: DoubleValidator { bottom: 0.0 top: 18446744.073709551615 @@ -542,23 +589,7 @@ Rectangle { } - Rectangle { - x: root.width/2 - width/2 - y: root.height/2 - height/2 - height:statusText.paintedHeight + 50 * scaleRatio - width:statusText.paintedWidth + 40 * scaleRatio - visible: statusText.text != "" - opacity: 0.9 - Text { - id: statusText - anchors.fill:parent - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - textFormat: Text.RichText - onLinkActivated: { appWindow.startDaemon(appWindow.persistentSettings.daemonFlags); } - } - } Component.onCompleted: { //Disable password page until enabled by updateStatus @@ -583,35 +614,35 @@ Rectangle { //TODO: enable send page when we're connected and daemon is synced function updateStatus() { + pageRoot.enabled = true; if(typeof currentWallet === "undefined") { - statusText.text = qsTr("Wallet is not connected to daemon.") + "<br>" + root.startLinkText + warningText.text = qsTr("Wallet is not connected to daemon.") + root.startLinkText return; } if (currentWallet.viewOnly) { - // statusText.text = qsTr("Wallet is view only.") + // warningText.text = qsTr("Wallet is view only.") //return; } - pageRoot.enabled = false; + //pageRoot.enabled = false; switch (currentWallet.connected()) { case Wallet.ConnectionStatus_Disconnected: - statusText.text = qsTr("Wallet is not connected to daemon.") + "<br>" + root.startLinkText + warningText.text = qsTr("Wallet is not connected to daemon.") + root.startLinkText break case Wallet.ConnectionStatus_WrongVersion: - statusText.text = qsTr("Connected daemon is not compatible with GUI. \n" + + warningText.text = qsTr("Connected daemon is not compatible with GUI. \n" + "Please upgrade or connect to another daemon") break default: if(!appWindow.daemonSynced){ - statusText.text = qsTr("Waiting on daemon synchronization to finish") + warningText.text = qsTr("Waiting on daemon synchronization to finish") } else { // everything OK, enable transfer page // Light wallet is always ready pageRoot.enabled = true; - statusText.text = ""; + warningText.text = ""; } - } } @@ -203,5 +203,6 @@ <file>components/HistoryTableInnerColumn.qml</file> <file>components/CheckBox2.qml</file> <file>js/TxUtils.js</file> + <file>images/warning.png</file> </qresource> </RCC> |
