From 77335b300a45645e8c01bb3c167877070f7a3f29 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sun, 6 Aug 2017 16:27:55 +0200 Subject: QrCodeScanner: parse extra parameters --- components/QRCodeScanner.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/QRCodeScanner.qml b/components/QRCodeScanner.qml index d9a6d933..669bd271 100644 --- a/components/QRCodeScanner.qml +++ b/components/QRCodeScanner.qml @@ -44,7 +44,7 @@ Rectangle { color: "black" state: "Stopped" - signal qrcode_decoded(string address, string payment_id, string amount, string tx_description, string recipient_name) + signal qrcode_decoded(string address, string payment_id, string amount, string tx_description, string recipient_name, var extra_parameters) states: [ State { @@ -83,7 +83,7 @@ Rectangle { id : finder objectName: "QrFinder" onDecoded : { - root.qrcode_decoded(address, payment_id, amount, tx_description, recipient_name) + root.qrcode_decoded(address, payment_id, amount, tx_description, recipient_name, extra_parameters) root.state = "Stopped" } onNotifyError : { @@ -126,7 +126,7 @@ Rectangle { MessageDialog { id: messageDialog - title: "Scanning QrCode" + title: qsTr("QrCode Scanned") + translationManager.emptyString onAccepted: { root.state = "Stopped" } -- cgit v1.2.3 From c72207c2e28051b93274996bba3989938e4bcea4 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sun, 6 Aug 2017 16:48:18 +0200 Subject: transactionInfo: use empty str when fee=0 --- components/HistoryTable.qml | 2 +- src/libwalletqt/TransactionInfo.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'components') diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml index 082822d3..37665f15 100644 --- a/components/HistoryTable.qml +++ b/components/HistoryTable.qml @@ -383,7 +383,7 @@ ListView { Column { anchors.top: parent.top width: 148 - visible: isOut + visible: isOut && fee != "" Text { anchors.left: parent.left font.family: "Arial" diff --git a/src/libwalletqt/TransactionInfo.cpp b/src/libwalletqt/TransactionInfo.cpp index 5ad739bf..a787b151 100644 --- a/src/libwalletqt/TransactionInfo.cpp +++ b/src/libwalletqt/TransactionInfo.cpp @@ -38,6 +38,8 @@ QString TransactionInfo::displayAmount() const QString TransactionInfo::fee() const { + if(m_pimpl->fee() == 0) + return ""; return WalletManager::instance()->displayAmount(m_pimpl->fee()); } -- cgit v1.2.3 From 085dfe114a9a4b9a8ec87fe0577280c10f937393 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sun, 6 Aug 2017 18:12:37 +0200 Subject: checkbox redesign --- components/CheckBox.qml | 91 +++++++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 41 deletions(-) (limited to 'components') diff --git a/components/CheckBox.qml b/components/CheckBox.qml index ffe585c3..267106b1 100644 --- a/components/CheckBox.qml +++ b/components/CheckBox.qml @@ -29,61 +29,70 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -Item { +RowLayout { id: checkBox property alias text: label.text property string checkedIcon property string uncheckedIcon property bool checked: false property alias background: backgroundRect.color - property int fontSize: 14 + property int fontSize: 14 * scaleRatio property alias fontColor: label.color signal clicked() - height: 25 - width: label.x + label.width - Layout.minimumWidth: label.x + label.contentWidth - clip: true + height: 25 * scaleRatio - Rectangle { - anchors.left: parent.left - height: parent.height - 1 - width: 25 - //radius: 4 - y: 0 - color: "#DBDBDB" + function toggle(){ + checkBox.checked = !checkBox.checked + checkBox.clicked() } - Rectangle { - id: backgroundRect - anchors.left: parent.left - height: parent.height - 1 - width: 25 - //radius: 4 - y: 1 - color: "#FFFFFF" - - Image { - anchors.centerIn: parent - source: checkBox.checked ? checkBox.checkedIcon : - checkBox.uncheckedIcon + RowLayout { + Layout.fillWidth: true + Rectangle { + anchors.left: parent.left + width: 25 * scaleRatio + height: checkBox.height - 1 + //radius: 4 + y: 0 + color: "#DBDBDB" } - } - Text { - id: label - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 25 + 12 - font.family: "Arial" - font.pixelSize: checkBox.fontSize - color: "#525252" - } + Rectangle { + id: backgroundRect + anchors.left: parent.left + width: 25 * scaleRatio + height: checkBox.height - 1 + //radius: 4 + y: 1 + color: "#FFFFFF" + + Image { + anchors.centerIn: parent + source: checkBox.checked ? checkBox.checkedIcon : + checkBox.uncheckedIcon + } + + MouseArea { + anchors.fill: parent + onClicked: { + toggle() + } + } + } - MouseArea { - anchors.fill: parent - onClicked: { - checkBox.checked = !checkBox.checked - checkBox.clicked() + Text { + id: label + font.family: "Arial" + font.pixelSize: checkBox.fontSize + color: "#525252" + wrapMode: Text.Wrap + Layout.fillWidth: true + MouseArea { + anchors.fill: parent + onClicked: { + toggle() + } + } } } } -- cgit v1.2.3 From abd5f50713d2f106423a00fb9d22a36f189e3603 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sun, 6 Aug 2017 18:14:41 +0200 Subject: historyTable mobile layout --- components/HistoryTableMobile.qml | 186 ++++++++++++++++++++++++++++++++++++++ qml.qrc | 1 + 2 files changed, 187 insertions(+) create mode 100644 components/HistoryTableMobile.qml (limited to 'components') diff --git a/components/HistoryTableMobile.qml b/components/HistoryTableMobile.qml new file mode 100644 index 00000000..89a0b87d --- /dev/null +++ b/components/HistoryTableMobile.qml @@ -0,0 +1,186 @@ +// Copyright (c) 2014-2015, The Monero Project +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are +// permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, this list +// of conditions and the following disclaimer in the documentation and/or other +// materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import QtQuick 2.0 +import QtQuick.Layouts 1.1 +import moneroComponents.Clipboard 1.0 +import moneroComponents.AddressBookModel 1.0 + +ListView { + id: listView + clip: true + boundsBehavior: ListView.StopAtBounds + property var previousItem + property var addressBookModel: null + + function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations) { + var trStart = '', + trMiddle = '', + trEnd = ""; + + return '' + + (tx_id ? trStart + qsTr("Tx ID:") + trMiddle + tx_id + trEnd : "") + + (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "") + + (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "") + + (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "") + + (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "") + + "
" + + translationManager.emptyString; + } + + function lookupPaymentID(paymentId) { + if (!addressBookModel) + return "" + var idx = addressBookModel.lookupPaymentID(paymentId) + if (idx < 0) + return "" + idx = addressBookModel.index(idx, 0) + return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole) + } + + + footer: Rectangle { + height: 127 * scaleRatio + width: listView.width + color: "#FFFFFF" + + Text { + anchors.centerIn: parent + font.family: "Arial" + font.pixelSize: 14 * scaleRatio + color: "#545454" + text: qsTr("No more results") + translationManager.emptyString + } + } + + delegate: Rectangle { + id: delegate + height: tableContent.height + 10 * scaleRatio + width: listView.width + color: index % 2 ? "#F8F8F8" : "#FFFFFF" + z: listView.count - index + function collapseDropdown() { dropdown.expanded = false } + + StandardButton { + id: detailsButton + anchors.right:parent.right + anchors.rightMargin: 15 * scaleRatio + anchors.top: parent.top + anchors.topMargin: parent.height/2 - this.height/2 + width: 40 * scaleRatio + height: 20 * scaleRatio + fontSize: 6 * scaleRatio + shadowReleasedColor: "#FF4304" + shadowPressedColor: "#B32D00" + releasedColor: "#FF6C3C" + pressedColor: "#FF4304" + text: qsTr("Details") + onClicked: { + var tx_key = currentWallet.getTxKey(hash) + var tx_note = currentWallet.getUserNote(hash) + + informationPopup.title = "Transaction details"; + informationPopup.text = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations); + informationPopup.open(); + informationPopup.onCloseCallback = null + } + } + + + ColumnLayout { + id: tableContent + // Date + RowLayout { + Layout.topMargin: 10 * scaleRatio + Layout.leftMargin: 10 * scaleRatio + Text { + font.family: "Arial" + font.pixelSize: 10 * scaleRatio + color: "#555555" + text: date + } + + Text { + font.family: "Arial" + font.pixelSize: 10 * scaleRatio + color: "#555555" + text: time + } + + // Show confirmations + Text { + visible: confirmations < confirmationsRequired || isPending + Layout.leftMargin: 5 * scaleRatio + font.family: "Arial" + font.pixelSize: 10 * scaleRatio + color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454" + text: { + if (!isPending) + if(confirmations < confirmationsRequired) + return qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired) + if (!isOut) + return qsTr("UNCONFIRMED") + translationManager.emptyString + return qsTr("PENDING") + translationManager.emptyString + + } + } + } + + + // Amount & confirmations + RowLayout { + Layout.leftMargin: 10 * scaleRatio + spacing: 2 + Text { + font.family: "Arial" + font.pixelSize: 10 * scaleRatio + color: isOut ? "#FF4F41" : "#36B05B" + text: isOut ? "↓" : "↑" + } + + Text { + id: amountText + font.family: "Arial" + font.pixelSize: 14 * scaleRatio + color: isOut ? "#FF4F41" : "#36B05B" + text: displayAmount + } + } + } + } + + ListModel { + id: dropModel + ListElement { name: "Copy address to clipboard"; icon: "../images/dropdownCopy.png" } + ListElement { name: "Add to address book"; icon: "../images/dropdownAdd.png" } + ListElement { name: "Send to this address"; icon: "../images/dropdownSend.png" } + ListElement { name: "Find similar transactions"; icon: "../images/dropdownSearch.png" } + } + + Clipboard { id: clipboard } +} diff --git a/qml.qrc b/qml.qrc index cddc6d87..00468ad3 100644 --- a/qml.qrc +++ b/qml.qrc @@ -72,6 +72,7 @@ images/expandTable.png images/dropdownDel.png components/HistoryTable.qml + components/HistoryTableMobile.qml images/gotoBasicVersion.png images/goToBasicVersionHovered.png BasicPanel.qml -- cgit v1.2.3 From 4e8c7d95ad31c076b0a626c7cc59ec831da7b6c2 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Mon, 7 Aug 2017 12:32:51 +0200 Subject: add remoteNodeEdit component --- components/RemoteNodeEdit.qml | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 components/RemoteNodeEdit.qml (limited to 'components') diff --git a/components/RemoteNodeEdit.qml b/components/RemoteNodeEdit.qml new file mode 100644 index 00000000..83b059cd --- /dev/null +++ b/components/RemoteNodeEdit.qml @@ -0,0 +1,60 @@ +// Copyright (c) 2014-2017, The Monero Project +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are +// permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, this list +// of conditions and the following disclaimer in the documentation and/or other +// materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.2 +import QtQuick 2.2 +import QtQuick.Layouts 1.1 + +GridLayout { + columns: (isMobile) ? 1 : 2 + id: root + property alias daemonAddrText: daemonAddr.text + property alias daemonPortText: daemonPort.text + + signal editingFinished() + + function getAddress() { + return daemonAddr.text.trim() + ":" + daemonPort.text.trim() + } + + LineEdit { + id: daemonAddr + Layout.fillWidth: true + placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString + onEditingFinished: root.editingFinished() + } + + + LineEdit { + id: daemonPort + Layout.fillWidth: true + placeholderText: qsTr("Port") + translationManager.emptyString + onEditingFinished: root.editingFinished() + } +} -- cgit v1.2.3 From 9e0db8f4ffa7d979ffb07cd9d76aee885c261196 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Mon, 7 Aug 2017 15:47:56 +0200 Subject: components mobile scaling --- components/Label.qml | 14 ++++++---- components/LineEdit.qml | 12 ++++---- components/MenuButton.qml | 18 ++++++------ components/MobileHeader.qml | 42 ++++++++++++++-------------- components/NetworkStatusItem.qml | 59 ++++++++++++++++++++++------------------ components/PasswordDialog.qml | 18 +++++------- components/ProcessingSplash.qml | 12 ++++---- components/StandardButton.qml | 6 ++-- components/StandardDialog.qml | 12 +++----- components/StandardDropdown.qml | 46 +++++++++++++++---------------- components/TickDelegate.qml | 2 +- components/TitleBar.qml | 4 +-- 12 files changed, 122 insertions(+), 123 deletions(-) (limited to 'components') diff --git a/components/Label.qml b/components/Label.qml index 30ff3d33..ac5c92ec 100644 --- a/components/Label.qml +++ b/components/Label.qml @@ -35,19 +35,21 @@ Item { property alias color: label.color property alias textFormat: label.textFormat property string tipText: "" - property int fontSize: 12 + property int fontSize: 16 * scaleRatio property alias wrapMode: label.wrapMode + property alias horizontalAlignment: label.horizontalAlignment signal linkActivated() - width: icon.x + icon.width - height: icon.height + width: icon.x + icon.width * scaleRatio + height: icon.height * scaleRatio + Layout.topMargin: 10 * scaleRatio Text { id: label anchors.bottom: parent.bottom - anchors.bottomMargin: 2 + anchors.bottomMargin: 2 * scaleRatio anchors.left: parent.left font.family: "Arial" - font.pixelSize: parent.fontSize + font.pixelSize: fontSize color: "#555555" onLinkActivated: item.linkActivated() } @@ -56,7 +58,7 @@ Item { id: icon anchors.verticalCenter: parent.verticalCenter anchors.left: label.right - anchors.leftMargin: 5 + anchors.leftMargin: 5 * scaleRatio source: "../images/whatIsIcon.png" visible: appWindow.whatIsEnable } diff --git a/components/LineEdit.qml b/components/LineEdit.qml index 3760fd2a..f7cb0612 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -36,13 +36,13 @@ Item { property alias readOnly : input.readOnly property alias cursorPosition: input.cursorPosition property alias echoMode: input.echoMode - property int fontSize: 18 + property int fontSize: 18 * scaleRatio property bool error: false signal editingFinished() signal accepted(); signal textUpdated(); - height: 37 + height: 37 * scaleRatio function getColor(error) { if (error) @@ -53,14 +53,14 @@ Item { Rectangle { anchors.fill: parent - anchors.bottomMargin: 1 + anchors.bottomMargin: 1 * scaleRatio color: "#DBDBDB" //radius: 4 } Rectangle { anchors.fill: parent - anchors.topMargin: 1 + anchors.topMargin: 1 * scaleRatio color: getColor(error) //radius: 4 } @@ -68,8 +68,8 @@ Item { Input { id: input anchors.fill: parent - anchors.leftMargin: 4 - anchors.rightMargin: 30 + anchors.leftMargin: 4 * scaleRatio + anchors.rightMargin: 30 * scaleRatio font.pixelSize: parent.fontSize onEditingFinished: item.editingFinished() onAccepted: item.accepted(); diff --git a/components/MenuButton.qml b/components/MenuButton.qml index a7baa019..0e33057c 100644 --- a/components/MenuButton.qml +++ b/components/MenuButton.qml @@ -42,7 +42,7 @@ Rectangle { var offset = 0 var item = button while (item.under) { - offset += 20 + offset += 20 * scaleRatio item = item.under } return offset @@ -50,7 +50,7 @@ Rectangle { color: checked ? "#FFFFFF" : "#1C1C1C" property bool present: !under || under.checked || checked || under.numSelectedChildren > 0 - height: present ? ((appWindow.height >= 800) ? 64 : 52) : 0 + height: present ? ((appWindow.height >= 800) ? 64 * scaleRatio : 52 * scaleRatio ) : 0 transform: Scale { yScale: button.present ? 1 : 0 @@ -76,18 +76,18 @@ Rectangle { anchors.bottom: parent.bottom anchors.left: parent.left anchors.leftMargin: parent.getOffset() - width: 50 + width: 50 * scaleRatio Rectangle { id: dot anchors.centerIn: parent - width: 16 + width: 16 * scaleRatio height: width radius: height / 2 Rectangle { anchors.centerIn: parent - width: 12 + width: 12 * scaleRatio height: width radius: height / 2 color: "#1C1C1C" @@ -98,7 +98,7 @@ Rectangle { Text { id: symbolText anchors.centerIn: parent - font.pixelSize: 11 + font.pixelSize: 11 * scaleRatio font.bold: true color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color visible: appWindow.ctrlPressed @@ -117,7 +117,7 @@ Rectangle { Image { anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: 20 + anchors.rightMargin: 20 * scaleRatio anchors.leftMargin: parent.getOffset() source: "../images/menuIndicator.png" } @@ -126,9 +126,9 @@ Rectangle { id: label anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - anchors.leftMargin: parent.getOffset() + 50 + anchors.leftMargin: parent.getOffset() + 50 * scaleRatio font.family: "Arial" - font.pixelSize: 18 + font.pixelSize: 18 * scaleRatio color: parent.checked ? "#000000" : "#FFFFFF" } diff --git a/components/MobileHeader.qml b/components/MobileHeader.qml index 73b22430..0cd9c5e6 100644 --- a/components/MobileHeader.qml +++ b/components/MobileHeader.qml @@ -10,17 +10,16 @@ Rectangle { anchors.leftMargin: 1 anchors.rightMargin: 1 Layout.fillWidth: true - Layout.preferredHeight: 64 + Layout.preferredHeight: 64 * scaleRatio color: "#FFFFFF" -// visible: basicMode Image { id: logo - visible: appWindow.width > 460 + visible: appWindow.width > 460 * scaleRatio anchors.verticalCenter: parent.verticalCenter anchors.verticalCenterOffset: -5 anchors.left: parent.left - anchors.leftMargin: appWindow.persistentSettings.customDecorations ? 20 : 40 + anchors.leftMargin: 50 * scaleRatio source: "../images/moneroLogo2.png" } @@ -28,9 +27,8 @@ Rectangle { id: icon visible: !logo.visible anchors.verticalCenter: parent.verticalCenter -// anchors.verticalCenterOffset: -5 anchors.left: parent.left - anchors.leftMargin: appWindow.persistentSettings.customDecorations ? 20 : 40 + anchors.leftMargin: 40 * scaleRatio source: "../images/moneroIcon.png" } @@ -38,16 +36,16 @@ Rectangle { anchors.verticalCenter: parent.verticalCenter anchors.top: parent.top anchors.right: parent.right - anchors.topMargin: 10 - width: 256 + anchors.topMargin: 10 * scaleRatio + width: 256 * scaleRatio columns: 3 Text { id: balanceLabel - width: 116 - height: 20 + width: 116 * scaleRatio + height: 20 * scaleRatio font.family: "Arial" - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio font.letterSpacing: -1 elide: Text.ElideRight horizontalAlignment: Text.AlignLeft @@ -58,10 +56,10 @@ Rectangle { Text { id: balanceText - width: 110 - height: 20 + width: 110 * scaleRatio + height: 20 * scaleRatio font.family: "Arial" - font.pixelSize: 18 + font.pixelSize: 18 * scaleRatio font.letterSpacing: -1 elide: Text.ElideRight horizontalAlignment: Text.AlignLeft @@ -71,8 +69,8 @@ Rectangle { } Item { - height: 20 - width: 20 + height: 20 * scaleRatio + width: 20 * scaleRatio Image { anchors.verticalCenter: parent.verticalCenter @@ -82,10 +80,10 @@ Rectangle { } Text { - width: 116 - height: 20 + width: 116 * scaleRatio + height: 20 * scaleRatio font.family: "Arial" - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio font.letterSpacing: -1 elide: Text.ElideRight horizontalAlignment: Text.AlignLeft @@ -96,10 +94,10 @@ Rectangle { Text { id: availableBalanceText - width: 110 - height: 20 + width: 110 * scaleRatio + height: 20 * scaleRatio font.family: "Arial" - font.pixelSize: 14 + font.pixelSize: 14 * scaleRatio font.letterSpacing: -1 elide: Text.ElideRight horizontalAlignment: Text.AlignLeft diff --git a/components/NetworkStatusItem.qml b/components/NetworkStatusItem.qml index 5ba77585..ac2d2568 100644 --- a/components/NetworkStatusItem.qml +++ b/components/NetworkStatusItem.qml @@ -60,37 +60,44 @@ Row { return qsTr("Invalid connection status") } - Item { - id: iconItem - anchors.bottom: parent.bottom - width: 50 - height: 50 - Image { - anchors.centerIn: parent - source: getConnectionStatusImage(item.connected) + color: "#1C1C1C" + Row { + height: 60 * scaleRatio + Item { + id: iconItem + anchors.bottom: parent.bottom + width: 50 * scaleRatio + height: 50 * scaleRatio + + Image { + anchors.centerIn: parent + source: getConnectionStatusImage(item.connected) + } } - } - Column { - anchors.bottom: parent.bottom - height: 53 - spacing: 3 + Column { + anchors.bottom: parent.bottom + height: 53 * scaleRatio + spacing: 3 * scaleRatio - Text { - anchors.left: parent.left - font.family: "Arial" - font.pixelSize: 12 - color: "#545454" - text: qsTr("Network status") + translationManager.emptyString - } + Text { + anchors.left: parent.left + font.family: "Arial" + font.pixelSize: 12 * scaleRatio + color: "#545454" + text: qsTr("Network status") + translationManager.emptyString + } - Text { - anchors.left: parent.left - font.family: "Arial" - font.pixelSize: 18 - color: getConnectionStatusColor(item.connected) - text: getConnectionStatusString(item.connected) + translationManager.emptyString + Text { + anchors.left: parent.left + font.family: "Arial" + font.pixelSize: 18 * scaleRatio + color: getConnectionStatusColor(item.connected) + text: getConnectionStatusString(item.connected) + translationManager.emptyString + } } } + + } diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index db9654cb..62e3a31a 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -53,8 +53,8 @@ Window { } // TODO: implement without hardcoding sizes - width: 480 - height: walletName ? 240 : 200 +// width: isMobile ? screenWidth : 480 +// height: isMobile ? screenHeight - mobileHeader.height : walletName ? 240 : 200 // Make window draggable MouseArea { @@ -68,7 +68,7 @@ Window { ColumnLayout { id: mainLayout spacing: 10 - anchors { fill: parent; margins: 35 } + anchors { fill: parent; margins: 35 * scaleRatio } ColumnLayout { id: column @@ -81,20 +81,20 @@ Window { Layout.columnSpan: 2 Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter - font.pixelSize: 24 + font.pixelSize: 24 * scaleRatio font.family: "Arial" color: "#555555" } TextField { id : passwordInput - focus: true Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter + Layout.maximumWidth: 400 * scaleRatio horizontalAlignment: TextInput.AlignHCenter verticalAlignment: TextInput.AlignVCenter font.family: "Arial" - font.pixelSize: 32 + font.pixelSize: 32 * scaleRatio echoMode: TextInput.Password KeyNavigation.tab: okButton @@ -142,13 +142,11 @@ Window { // Ok/Cancel buttons RowLayout { id: buttons - spacing: 60 + spacing: 60 * scaleRatio Layout.alignment: Qt.AlignHCenter MoneroComponents.StandardButton { id: cancelButton - width: 120 - fontSize: 14 shadowReleasedColor: "#FF4304" shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" @@ -162,8 +160,6 @@ Window { } MoneroComponents.StandardButton { id: okButton - width: 120 - fontSize: 14 shadowReleasedColor: "#FF4304" shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" diff --git a/components/ProcessingSplash.qml b/components/ProcessingSplash.qml index 2f6725db..17091204 100644 --- a/components/ProcessingSplash.qml +++ b/components/ProcessingSplash.qml @@ -38,8 +38,8 @@ Window { property alias messageText: messageTitle.text property alias heightProgressText : heightProgress.text - width: 200 - height: 100 + width: 200 * scaleRatio + height: 100 * scaleRatio opacity: 0.7 ColumnLayout { @@ -49,8 +49,8 @@ Window { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 30 - anchors.rightMargin: 30 + anchors.leftMargin: 30 * scaleRatio + anchors.rightMargin: 30 * scaleRatio BusyIndicator { running: parent.visible @@ -61,7 +61,7 @@ Window { id: messageTitle text: "Please wait..." font { - pixelSize: 22 + pixelSize: 22 * scaleRatio } horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter @@ -72,7 +72,7 @@ Window { Text { id: heightProgress font { - pixelSize: 18 + pixelSize: 18 * scaleRatio } horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter diff --git a/components/StandardButton.qml b/components/StandardButton.qml index 33cedee7..c55ebb12 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -31,19 +31,19 @@ import QtQuick.Layouts 1.1 Item { id: button - height: 37 + height: 37 * scaleRatio property string shadowPressedColor property string shadowReleasedColor property string pressedColor property string releasedColor property string icon: "" property string textColor: "#FFFFFF" - property int fontSize: 12 + property int fontSize: 12 * scaleRatio property alias text: label.text signal clicked() // Dynamic label width - Layout.minimumWidth: (label.contentWidth > 80)? label.contentWidth + 20 : 100 + Layout.minimumWidth: (label.contentWidth + 10 * scaleRatio) // (label.contentWidth > 80)? label.contentWidth + 20 : 100 Rectangle { anchors.left: parent.left diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index 681c2d3d..5c62919c 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -68,8 +68,8 @@ Window { } // TODO: implement without hardcoding sizes - width: 480 - height: 280 + width: isMobile ? screenWidth : 480 + height: isMobile ? screenHeight : 280 ColumnLayout { id: mainLayout @@ -84,7 +84,7 @@ Window { Label { id: dialogTitle horizontalAlignment: Text.AlignHCenter - font.pixelSize: 32 + font.pixelSize: 32 * scaleRatio font.family: "Arial" color: "#555555" } @@ -99,7 +99,7 @@ Window { font.family: "Arial" textFormat: TextEdit.AutoText readOnly: true - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio } } @@ -111,8 +111,6 @@ Window { MoneroComponents.StandardButton { id: cancelButton - width: 120 - fontSize: 14 shadowReleasedColor: "#FF4304" shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" @@ -126,8 +124,6 @@ Window { MoneroComponents.StandardButton { id: okButton - width: 120 - fontSize: 14 shadowReleasedColor: "#FF4304" shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml index 50b60fe0..f8b41d9d 100644 --- a/components/StandardDropdown.qml +++ b/components/StandardDropdown.qml @@ -38,7 +38,7 @@ Item { property string textColor: "#FFFFFF" property alias currentIndex: column.currentIndex property bool expanded: false - height: 37 + height: 37 * scaleRatio onExpandedChanged: if(expanded) appWindow.currentItem = dropdown function hide() { dropdown.expanded = false } @@ -59,7 +59,7 @@ Item { anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top - height: 37 + height: 37 * scaleRatio Rectangle { anchors.left: parent.left @@ -82,8 +82,8 @@ Item { Rectangle { anchors.left: parent.left anchors.bottom: parent.bottom - height: 3 - width: 3 + height: 3 * scaleRatio + width: 3 * scaleRatio color: dropdown.pressedColor visible: dropdown.expanded || droplist.height > 0 } @@ -91,8 +91,8 @@ Item { Rectangle { anchors.right: parent.right anchors.bottom: parent.bottom - height: 3 - width: 3 + height: 3 * scaleRatio + width: 3 * scaleRatio color: dropdown.pressedColor visible: dropdown.expanded || droplist.height > 0 } @@ -101,11 +101,11 @@ Item { id: firstColText anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - anchors.leftMargin: 12 + anchors.leftMargin: 12 * scaleRatio elide: Text.ElideRight font.family: "Arial" font.bold: true - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio color: "#FFFFFF" text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : "" } @@ -114,10 +114,10 @@ Item { id: secondColText anchors.verticalCenter: parent.verticalCenter anchors.right: separator.left - anchors.rightMargin: 12 + anchors.rightMargin: 12 * scaleRatio width: dropdown.expanded ? w : (separator.x - 12) - (firstColText.x + firstColText.width + 5) font.family: "Arial" - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio color: "#FFFFFF" text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : "" @@ -129,7 +129,7 @@ Item { id: separator anchors.right: dropIndicator.left anchors.verticalCenter: parent.verticalCenter - height: 18 + height: 18 * scaleRatio width: 1 color: "#FFFFFF" } @@ -139,12 +139,12 @@ Item { anchors.top: parent.top anchors.bottom: parent.bottom anchors.right: parent.right - width: 32 + width: 32 * scaleRatio Image { anchors.centerIn: parent source: "../images/whiteDropIndicator.png" - rotation: dropdown.expanded ? 180 : 0 + rotation: dropdown.expanded ? 180 * scaleRatio : 0 } } @@ -168,14 +168,14 @@ Item { Rectangle { anchors.left: parent.left anchors.top: parent.top - width: 3; height: 3 + width: 3 * scaleRatio; height: 3 * scaleRatio color: dropdown.pressedColor } Rectangle { anchors.right: parent.right anchors.top: parent.top - width: 3; height: 3 + width: 3 * scaleRatio; height: 3 * scaleRatio color: dropdown.pressedColor } @@ -209,7 +209,7 @@ Item { delegate: Rectangle { anchors.left: parent.left anchors.right: parent.right - height: 30 + height: 30 * scaleRatio //radius: index === repeater.count - 1 ? 4 : 0 color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor @@ -217,11 +217,11 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.right: col2Text.left - anchors.leftMargin: 12 - anchors.rightMargin: column2.length > 0 ? 12 : 0 + anchors.leftMargin: 12 * scaleRatio + anchors.rightMargin: column2.length > 0 ? 12 * scaleRatio: 0 font.family: "Arial" font.bold: true - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio color: "#FFFFFF" text: qsTr(column1) + translationManager.emptyString } @@ -230,9 +230,9 @@ Item { id: col2Text anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: 45 + anchors.rightMargin: 45 * scaleRatio font.family: "Arial" - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio color: "#FFFFFF" text: column2 } @@ -240,14 +240,14 @@ Item { Rectangle { anchors.left: parent.left anchors.top: parent.top - width: 3; height: 3 + width: 3 * scaleRatio; height: 3 * scaleRatio color: parent.color } Rectangle { anchors.right: parent.right anchors.top: parent.top - width: 3; height: 3 + width: 3 * scaleRatio; height: 3 * scaleRatio color: parent.color } diff --git a/components/TickDelegate.qml b/components/TickDelegate.qml index 3b256a2d..4e9789a4 100644 --- a/components/TickDelegate.qml +++ b/components/TickDelegate.qml @@ -49,7 +49,7 @@ Item { anchors.bottomMargin: 2 font.family: "Arial" font.bold: true - font.pixelSize: 12 + font.pixelSize: 12 * scaleRatio color: "#4A4949" text: { if(currentIndex === 0) return qsTr("Normal") + translationManager.emptyString diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 34f25e73..8f147322 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -37,7 +37,7 @@ Rectangle { property alias basicButtonVisible: goToBasicVersionButton.visible property bool customDecorations: true signal goToBasicVersion(bool yes) - height: customDecorations ? 30 : 0 + height: customDecorations && !isMobile ? 30 : 0 y: -height property string title property alias maximizeButtonVisible: maximizeButton.visible @@ -59,7 +59,7 @@ Rectangle { anchors.top: parent.top anchors.left: parent.left color: basicMouseArea.containsMouse || !leftPanel.visible ? "#FFE00A" : "#000000" - height: 30 + height: 30 * scaleRatio width: height visible: isMobile -- cgit v1.2.3 From f605793cfcd15298579b08580fb37458a2c0e001 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:37:52 +0200 Subject: components android focus workaround --- components/MenuButton.qml | 9 ++++++++- components/StandardButton.qml | 12 +++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'components') diff --git a/components/MenuButton.qml b/components/MenuButton.qml index 0e33057c..23ab4f74 100644 --- a/components/MenuButton.qml +++ b/components/MenuButton.qml @@ -38,6 +38,13 @@ Rectangle { property var under: null signal clicked() + function doClick() { + // Android workaround + releaseFocus(); + clicked(); + } + + function getOffset() { var offset = 0 var item = button @@ -139,7 +146,7 @@ Rectangle { onClicked: { if(parent.checked) return - button.clicked() + button.doClick() parent.checked = true } } diff --git a/components/StandardButton.qml b/components/StandardButton.qml index c55ebb12..3954c58c 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -45,6 +45,12 @@ Item { // Dynamic label width Layout.minimumWidth: (label.contentWidth + 10 * scaleRatio) // (label.contentWidth > 80)? label.contentWidth + 20 : 100 + function doClick() { + // Android workaround + releaseFocus(); + clicked(); + } + Rectangle { anchors.left: parent.left anchors.right: parent.right @@ -98,9 +104,9 @@ Item { MouseArea { id: buttonArea anchors.fill: parent - onClicked: parent.clicked() + onClicked: doClick() } - Keys.onSpacePressed: clicked() - Keys.onReturnPressed: clicked() + Keys.onSpacePressed: doClick() + Keys.onReturnPressed: doClick() } -- cgit v1.2.3 From e0e69b35bd35f4e2097318a007011e758402451a Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:40:28 +0200 Subject: password dialog mobile redesign --- components/PasswordDialog.qml | 50 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'components') diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index 62e3a31a..51fc3913 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -35,37 +35,45 @@ import QtQuick.Window 2.0 import "../components" as MoneroComponents -Window { +Item { id: root - modality: Qt.ApplicationModal - flags: Qt.Window | Qt.FramelessWindowHint + visible: false + Rectangle { + id: bg + z: parent.z + 1 + anchors.fill: parent + color: "white" + opacity: 0.9 + } + property alias password: passwordInput.text property string walletName // same signals as Dialog has signal accepted() signal rejected() - + signal closeCallback() function open(walletName) { root.walletName = walletName ? walletName : "" + leftPanel.enabled = false + middlePanel.enabled = false + titleBar.enabled = false show() + root.visible = true; + passwordInput.focus = true } - // TODO: implement without hardcoding sizes -// width: isMobile ? screenWidth : 480 -// height: isMobile ? screenHeight - mobileHeader.height : walletName ? 240 : 200 - - // Make window draggable - MouseArea { - anchors.fill: parent - property point lastMousePos: Qt.point(0, 0) - onPressed: { lastMousePos = Qt.point(mouseX, mouseY); } - onMouseXChanged: root.x += (mouseX - lastMousePos.x) - onMouseYChanged: root.y += (mouseY - lastMousePos.y) + function close() { + leftPanel.enabled = true + middlePanel.enabled = true + titleBar.enabled = true + root.visible = false; + closeCallback(); } ColumnLayout { + z: bg.z + 1 id: mainLayout spacing: 10 anchors { fill: parent; margins: 35 * scaleRatio } @@ -128,16 +136,9 @@ Window { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter anchors.bottomMargin: 3 + Layout.maximumWidth: passwordInput.width } - // padding - Rectangle { - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - height: 10 - opacity: 0 - color: "black" - } } // Ok/Cancel buttons RowLayout { @@ -174,6 +175,3 @@ Window { } } } - - - -- cgit v1.2.3 From e3eab0c667b64b40cf843dc6d7e45dc5728adf7a Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:41:28 +0200 Subject: networkstatus: add remote node --- components/NetworkStatusItem.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'components') diff --git a/components/NetworkStatusItem.qml b/components/NetworkStatusItem.qml index ac2d2568..7e6a5d1d 100644 --- a/components/NetworkStatusItem.qml +++ b/components/NetworkStatusItem.qml @@ -29,7 +29,7 @@ import QtQuick 2.0 import moneroComponents.Wallet 1.0 -Row { +Rectangle { id: item property var connected: Wallet.ConnectionStatus_Disconnected @@ -51,6 +51,8 @@ Row { if (status == Wallet.ConnectionStatus_Connected) { if(!appWindow.daemonSynced) return qsTr("Synchronizing") + if(appWindow.remoteNodeConnected) + return qsTr("Remote node") return qsTr("Connected") } if (status == Wallet.ConnectionStatus_WrongVersion) -- cgit v1.2.3 From 30fde8d7fd9f121675ba99cd3b642c17834f1fb5 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:42:16 +0200 Subject: make input text selectable by mouse --- components/Input.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components') diff --git a/components/Input.qml b/components/Input.qml index 78bec8ea..1390ca17 100644 --- a/components/Input.qml +++ b/components/Input.qml @@ -33,7 +33,7 @@ import QtQuick 2.2 TextField { font.family: "Arial" horizontalAlignment: TextInput.AlignLeft - + selectByMouse: true style: TextFieldStyle { textColor: "#3F3F3F" placeholderTextColor: "#BABABA" -- cgit v1.2.3 From 31675f4c16a3f7c34c21569b27b8afadc6dc6e74 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:43:15 +0200 Subject: processing splash - mobile redesign --- components/ProcessingSplash.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/ProcessingSplash.qml b/components/ProcessingSplash.qml index 17091204..d7fbd5cb 100644 --- a/components/ProcessingSplash.qml +++ b/components/ProcessingSplash.qml @@ -31,10 +31,11 @@ import QtQuick.Window 2.1 import QtQuick.Controls 1.4 import QtQuick.Layouts 1.1 -Window { +Rectangle { id: root - modality: Qt.ApplicationModal - flags: Qt.Window + color: "white" + visible: false + z:11 property alias messageText: messageTitle.text property alias heightProgressText : heightProgress.text @@ -42,6 +43,14 @@ Window { height: 100 * scaleRatio opacity: 0.7 + function show() { + root.visible = true; + } + + function close() { + root.visible = false; + } + ColumnLayout { id: rootLayout -- cgit v1.2.3 From b82a17aa97141a32f0b4dc4adf5b0fa753840ecc Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:44:11 +0200 Subject: progressBar redesign --- components/ProgressBar.qml | 93 ++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 40 deletions(-) (limited to 'components') diff --git a/components/ProgressBar.qml b/components/ProgressBar.qml index 0c1519de..8f462122 100644 --- a/components/ProgressBar.qml +++ b/components/ProgressBar.qml @@ -29,15 +29,13 @@ import QtQuick 2.0 import moneroComponents.Wallet 1.0 -Item { +Rectangle { id: item property int fillLevel: 0 - height: 22 - anchors.margins:15 visible: false - //clip: true + color: "#1C1C1C" - function updateProgress(currentBlock,targetBlock, blocksToSync){ + function updateProgress(currentBlock,targetBlock, blocksToSync, statusTxt){ if(targetBlock == 1) { fillLevel = 0 progressText.text = qsTr("Establishing connection..."); @@ -54,53 +52,68 @@ Item { else var progressLevel = (100*(currentBlock/targetBlock)).toFixed(0); fillLevel = progressLevel - progressText.text = qsTr("Blocks remaining: %1").arg(remaining.toFixed(0)); + if(typeof statusTxt != "undefined" && statusTxt != "") { + progressText.text = statusTxt + (" %1").arg(remaining.toFixed(0)); + } else { + progressText.text = qsTr("Blocks remaining: %1").arg(remaining.toFixed(0)); + } + + + progressBar.visible = currentBlock < targetBlock } } - Rectangle { - id: bar - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: 22 - radius: 2 - color: "#FFFFFF" - + Item { + anchors.leftMargin: 15 * scaleRatio + anchors.rightMargin: 15 * scaleRatio + anchors.fill: parent Rectangle { - id: fillRect - anchors.top: parent.top - anchors.bottom: parent.bottom + id: bar anchors.left: parent.left - anchors.margins: 2 - height: bar.height - property int maxWidth: parent.width - 4 - width: (maxWidth * fillLevel) / 100 - color: { - if(item.fillLevel < 99 ) return "#FF6C3C" - //if(item.fillLevel < 99) return "#FFE00A" - return "#36B25C" - } + anchors.right: parent.right + anchors.top: parent.top + height: 22 * scaleRatio + radius: 2 * scaleRatio + color: "#FFFFFF" - } + Rectangle { + id: fillRect + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.margins: 2 * scaleRatio + height: bar.height + property int maxWidth: parent.width - 4 * scaleRatio + width: (maxWidth * fillLevel) / 100 + color: { + if(item.fillLevel < 99 ) return "#FF6C3C" + //if(item.fillLevel < 99) return "#FFE00A" + return "#36B25C" + } - Rectangle { - color:"#333" - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.leftMargin: 8 + } - Text { - id:progressText + Rectangle { + color:"#333" anchors.bottom: parent.bottom - font.family: "Arial" - font.pixelSize: 12 - color: "#000" - text: qsTr("Synchronizing blocks") - height:18 + anchors.left: parent.left + anchors.leftMargin: 8 * scaleRatio + + Text { + id:progressText + anchors.bottom: parent.bottom + font.family: "Arial" + font.pixelSize: 12 * scaleRatio + color: "#000" + text: qsTr("Synchronizing blocks") + height:18 * scaleRatio + } } } + } + + } -- cgit v1.2.3 From 027ed0e328f38c503c864c5bec31ca3d2b509e87 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:44:53 +0200 Subject: StandardDialog redesign --- components/StandardDialog.qml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index 5c62919c..ae2b79ff 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -35,10 +35,10 @@ import QtQuick.Window 2.0 import "../components" as MoneroComponents -Window { +Rectangle { id: root - modality: Qt.ApplicationModal - flags: Qt.Window | Qt.FramelessWindowHint + color: "white" + visible: false property alias title: dialogTitle.text property alias text: dialogContent.text property alias content: root.text @@ -53,6 +53,7 @@ Window { // same signals as Dialog has signal accepted() signal rejected() + signal closeCallback(); // Make window draggable MouseArea { @@ -64,7 +65,19 @@ Window { } function open() { + // Center + if(!isMobile) { + root.x = appWindow.width/2 - root.width/2 + root.y = screenHeight/2 - root.height/2 + } show() + root.z = 11 + root.visible = true; + } + + function close() { + root.visible = false; + closeCallback(); } // TODO: implement without hardcoding sizes -- cgit v1.2.3 From d437b98a12c06a24c19fa2093d3ab643141564a5 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:45:17 +0200 Subject: standardbuttons - default colors --- components/StandardButton.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'components') diff --git a/components/StandardButton.qml b/components/StandardButton.qml index 3954c58c..0ee722b5 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -32,10 +32,10 @@ import QtQuick.Layouts 1.1 Item { id: button height: 37 * scaleRatio - property string shadowPressedColor - property string shadowReleasedColor - property string pressedColor - property string releasedColor + property string shadowPressedColor: "#B32D00" + property string shadowReleasedColor: "#FF4304" + property string pressedColor: "#FF4304" + property string releasedColor: "#FF6C3C" property string icon: "" property string textColor: "#FFFFFF" property int fontSize: 12 * scaleRatio -- cgit v1.2.3 From 1c7f529141f4da0a2ab7981c7c1e18daa757e566 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:46:36 +0200 Subject: fix Qt 5.8 crash on app exit bug in StandardDialog --- components/StandardDropdown.qml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml index f8b41d9d..5aac249b 100644 --- a/components/StandardDropdown.qml +++ b/components/StandardDropdown.qml @@ -38,6 +38,9 @@ Item { property string textColor: "#FFFFFF" property alias currentIndex: column.currentIndex property bool expanded: false + + signal changed(); + height: 37 * scaleRatio onExpandedChanged: if(expanded) appWindow.currentItem = dropdown @@ -54,6 +57,12 @@ Item { return true } + // Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit + function update() { + firstColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : "" + secondColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : "" + } + Item { id: head anchors.left: parent.left @@ -107,7 +116,6 @@ Item { font.bold: true font.pixelSize: 12 * scaleRatio color: "#FFFFFF" - text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : "" } Text { @@ -119,8 +127,6 @@ Item { font.family: "Arial" font.pixelSize: 12 * scaleRatio color: "#FFFFFF" - text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : "" - property int w: 0 Component.onCompleted: w = implicitWidth } @@ -258,6 +264,8 @@ Item { onClicked: { dropdown.expanded = false column.currentIndex = index + changed(); + dropdown.update() } } } -- cgit v1.2.3 From aec65db8c3919692a6243458af18d087f6385f50 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:48:06 +0200 Subject: add mobile menu --- components/TitleBar.qml | 9 ++++++--- images/menu.png | Bin 0 -> 1609 bytes qml.qrc | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 images/menu.png (limited to 'components') diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 8f147322..531d5196 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -28,6 +28,7 @@ import QtQuick 2.2 import QtQuick.Window 2.0 +import QtQuick.Layouts 1.1 Rectangle { id: titleBar @@ -53,6 +54,7 @@ Rectangle { } Rectangle { + id: goToBasicVersionButton property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width property bool checked: false @@ -64,10 +66,10 @@ Rectangle { visible: isMobile Image { + width: parent.width * 2/3; + height: width; anchors.centerIn: parent - rotation: !leftPanel.visible ? 180 : 0 - source: parent.customDecorations || !leftPanel.visible ? "../images/goToBasicVersionHovered.png" : - "../images/gotoBasicVersion.png" + source: "../images/menu.png" } MouseArea { @@ -75,6 +77,7 @@ Rectangle { hoverEnabled: true anchors.fill: parent onClicked: { + releaseFocus() parent.checked = !parent.checked titleBar.goToBasicVersion(leftPanel.visible) } diff --git a/images/menu.png b/images/menu.png new file mode 100644 index 00000000..95378c69 Binary files /dev/null and b/images/menu.png differ diff --git a/qml.qrc b/qml.qrc index a8ba7c87..7f1b3c37 100644 --- a/qml.qrc +++ b/qml.qrc @@ -147,5 +147,6 @@ wizard/WizardDaemonSettings.qml components/RemoteNodeEdit.qml pages/Keys.qml + images/menu.png -- cgit v1.2.3 From c1c6d9ee6d2ac277431651e561819e34b93aeea9 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 11:07:06 +0200 Subject: History: use mobile layout --- components/HistoryTableMobile.qml | 2 +- pages/History.qml | 49 ++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 28 deletions(-) (limited to 'components') diff --git a/components/HistoryTableMobile.qml b/components/HistoryTableMobile.qml index 89a0b87d..9e823c8d 100644 --- a/components/HistoryTableMobile.qml +++ b/components/HistoryTableMobile.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2015, The Monero Project +// Copyright (c) 2014-2017, The Monero Project // // All rights reserved. // diff --git a/pages/History.qml b/pages/History.qml index 71a2e54c..9b184741 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -80,7 +80,7 @@ Rectangle { } onModelChanged: { - if (typeof model !== 'undefined') { + if (typeof model !== 'undefined' && model != null) { selectedAmount.text = getSelectedAmount() @@ -146,30 +146,6 @@ Rectangle { fontSize: 14 } - - // Filter by Address input (senseless, removing) - /* - Label { - id: addressLabel - anchors.left: parent.left - anchors.top: filterHeaderText.bottom - anchors.leftMargin: 17 - anchors.topMargin: 17 - text: qsTr("Address") - fontSize: 14 - } - - LineEdit { - id: addressLine - anchors.left: parent.left - anchors.right: parent.right - anchors.top: addressLabel.bottom - anchors.leftMargin: 17 - anchors.rightMargin: 17 - anchors.topMargin: 5 - } - */ - // Filter by string LineEdit { visible: !isMobile @@ -533,6 +509,7 @@ Rectangle { Scroll { id: flickableScroll + visible: !isMobile anchors.right: table.right anchors.rightMargin: !isMobile ? -14 * scaleRatio : 0 anchors.top: table.top @@ -542,6 +519,7 @@ Rectangle { HistoryTable { id: table + visible: !isMobile anchors.left: parent.left anchors.right: parent.right anchors.top: header.bottom @@ -549,12 +527,29 @@ Rectangle { anchors.leftMargin: 14 * scaleRatio anchors.rightMargin: 14 * scaleRatio onContentYChanged: flickableScroll.flickableContentYChanged() - model: root.model + model: !isMobile ? root.model : null + addressBookModel: null + } + + HistoryTableMobile { + id: tableMobile + visible: isMobile + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + anchors.bottom: parent.bottom + onContentYChanged: flickableScroll.flickableContentYChanged() + model: isMobile ? root.model : null addressBookModel: null } } function onPageCompleted() { - table.addressBookModel = appWindow.currentWallet ? appWindow.currentWallet.addressBookModel : null + if(currentWallet != null && typeof currentWallet.history !== "undefined" ) { + currentWallet.history.refresh() + table.addressBookModel = currentWallet ? currentWallet.addressBookModel : null + transactionTypeDropdown.update() + } + } } -- cgit v1.2.3 From 4b871306e465d58844e52e799abcb1259c90ad09 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sun, 20 Aug 2017 22:23:22 +0200 Subject: fix popups positioning --- components/DaemonManagerDialog.qml | 2 +- components/HistoryTable.qml | 16 ++++------------ components/StandardDialog.qml | 2 +- main.qml | 4 ++-- 4 files changed, 8 insertions(+), 16 deletions(-) (limited to 'components') diff --git a/components/DaemonManagerDialog.qml b/components/DaemonManagerDialog.qml index 77908b1f..009787eb 100644 --- a/components/DaemonManagerDialog.qml +++ b/components/DaemonManagerDialog.qml @@ -90,7 +90,7 @@ Window { } Text { - text: qsTr("Starting Monero daemon in %1 seconds").arg(countDown); + text: qsTr("Starting local node in %1 seconds").arg(countDown); font.pixelSize: 18 Layout.alignment: Qt.AlignHCenter Layout.fillWidth: true diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml index 37665f15..d8024d18 100644 --- a/components/HistoryTable.qml +++ b/components/HistoryTable.qml @@ -79,14 +79,6 @@ ListView { } } - StandardDialog { - id: detailsPopup - cancelVisible: false - okVisible: true - width:850 - } - - delegate: Rectangle { id: delegate height: 144 @@ -111,10 +103,10 @@ ListView { onClicked: { var tx_key = currentWallet.getTxKey(hash) var tx_note = currentWallet.getUserNote(hash) - detailsPopup.title = "Transaction details"; - detailsPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations); - detailsPopup.open(); - + informationPopup.title = "Transaction details"; + informationPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations); + informationPopup.onCloseCallback = null + informationPopup.open(); } } diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index ae2b79ff..d3e14b29 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -67,7 +67,7 @@ Rectangle { function open() { // Center if(!isMobile) { - root.x = appWindow.width/2 - root.width/2 + root.x = parent.width/2 - root.width/2 root.y = screenHeight/2 - root.height/2 } show() diff --git a/main.qml b/main.qml index 82ca8094..e783ead7 100644 --- a/main.qml +++ b/main.qml @@ -1146,8 +1146,8 @@ ApplicationWindow { id: splash width: appWindow.width / 1.5 height: appWindow.height / 2 - x: (appWindow.width - width) / 2 + appWindow.x - y: (appWindow.height - height) / 2 + appWindow.y + x: (appWindow.width - width) / 2 + y: (appWindow.height - height) / 2 messageText: qsTr("Please wait...") } -- cgit v1.2.3 From 2170f6a46d42704f5fe1b0ff04bf7a9a5992804f Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Nov 2017 07:51:15 +0100 Subject: Improve copy text handling --- components/AddressBookTable.qml | 4 +++- components/StandardDialog.qml | 15 +++++++++++++++ main.qml | 3 ++- pages/Keys.qml | 8 ++++++++ pages/Receive.qml | 3 +++ wizard/WizardMemoTextInput.qml | 6 +++++- 6 files changed, 36 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/AddressBookTable.qml b/components/AddressBookTable.qml index abf72371..4d281440 100644 --- a/components/AddressBookTable.qml +++ b/components/AddressBookTable.qml @@ -144,8 +144,10 @@ ListView { onOptionClicked: { // Ensure tooltip is closed appWindow.toolTip.visible = false; - if(option === 0) + if(option === 0) { clipboard.setText(address) + appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3) + } else if(option === 1){ console.log("Sending to: ", address +" "+ paymentId); middlePanel.sendTo(address, paymentId, description); diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index d3e14b29..044c0a5c 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -113,6 +113,21 @@ Rectangle { textFormat: TextEdit.AutoText readOnly: true font.pixelSize: 12 * scaleRatio + selectByMouse: false + + MouseArea { + anchors.fill: parent + onClicked: { + appWindow.showStatusMessage(qsTr("Double tap to copy"),3) + } + onDoubleClicked: { + parent.selectAll() + parent.copy() + parent.deselect() + console.log("copied to clipboard"); + appWindow.showStatusMessage(qsTr("Content copied to clipboard"),3) + } + } } } diff --git a/main.qml b/main.qml index e3307610..5c430e5f 100644 --- a/main.qml +++ b/main.qml @@ -1481,10 +1481,11 @@ ApplicationWindow { Rectangle { id: statusMessage + z: 99 visible: false property alias text: statusMessageText.text anchors.bottom: parent.bottom - width: 200 * scaleRatio + width: statusMessageText.contentWidth + 20 * scaleRatio anchors.horizontalCenter: parent.horizontalCenter color: "black" height: 40 * scaleRatio diff --git a/pages/Keys.qml b/pages/Keys.qml index 6c78b7a3..3fad708d 100644 --- a/pages/Keys.qml +++ b/pages/Keys.qml @@ -75,10 +75,14 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { + appWindow.showStatusMessage(qsTr("Double tap to copy"),3) + } + onDoubleClicked: { parent.selectAll() parent.copy() parent.deselect() console.log("copied to clipboard"); + appWindow.showStatusMessage(qsTr("Seed copied to clipboard"),3) } } } @@ -105,10 +109,14 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { + appWindow.showStatusMessage(qsTr("Double tap to copy"),3) + } + onDoubleClicked: { parent.selectAll() parent.copy() parent.deselect() console.log("copied to clipboard"); + appWindow.showStatusMessage(qsTr("Keys copied to clipboard"),3) } } } diff --git a/pages/Receive.qml b/pages/Receive.qml index bd3d0bd3..b22ddfcd 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -205,6 +205,7 @@ Rectangle { if (addressLine.text.length > 0) { console.log(addressLine.text + " copied to clipboard") clipboard.setText(addressLine.text) + appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3) } } } @@ -237,6 +238,7 @@ Rectangle { onClicked: { if (paymentIdLine.text.length > 0) { clipboard.setText(paymentIdLine.text) + appWindow.showStatusMessage(qsTr("Payment ID copied to clipboard"),3) } } } @@ -289,6 +291,7 @@ Rectangle { onClicked: { if (integratedAddressLine.text.length > 0) { clipboard.setText(integratedAddressLine.text) + appWindow.showStatusMessage(qsTr("Integrated address copied to clipboard"),3) } } } diff --git a/wizard/WizardMemoTextInput.qml b/wizard/WizardMemoTextInput.qml index c999f49c..d278508e 100644 --- a/wizard/WizardMemoTextInput.qml +++ b/wizard/WizardMemoTextInput.qml @@ -59,7 +59,11 @@ Column { MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - onClicked: clipboard.setText(memoTextInput.text) + onClicked: { + clipboard.setText(memoTextInput.text) + appWindow.showStatusMessage(qsTr("Seed copied to clipboard"),3) + } + } } Rectangle { -- cgit v1.2.3 From 394b20ee3624e7cd7a60307d24da1c66b5249a5f Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Nov 2017 07:52:01 +0100 Subject: history table - improved mobile layout --- components/HistoryTableMobile.qml | 49 +++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'components') diff --git a/components/HistoryTableMobile.qml b/components/HistoryTableMobile.qml index 9e823c8d..87545755 100644 --- a/components/HistoryTableMobile.qml +++ b/components/HistoryTableMobile.qml @@ -80,26 +80,14 @@ ListView { delegate: Rectangle { id: delegate - height: tableContent.height + 10 * scaleRatio + height: tableContent.height + 20 * scaleRatio width: listView.width color: index % 2 ? "#F8F8F8" : "#FFFFFF" + Layout.leftMargin: 10 * scaleRatio z: listView.count - index function collapseDropdown() { dropdown.expanded = false } - - StandardButton { - id: detailsButton - anchors.right:parent.right - anchors.rightMargin: 15 * scaleRatio - anchors.top: parent.top - anchors.topMargin: parent.height/2 - this.height/2 - width: 40 * scaleRatio - height: 20 * scaleRatio - fontSize: 6 * scaleRatio - shadowReleasedColor: "#FF4304" - shadowPressedColor: "#B32D00" - releasedColor: "#FF6C3C" - pressedColor: "#FF4304" - text: qsTr("Details") + MouseArea { + anchors.fill: parent onClicked: { var tx_key = currentWallet.getTxKey(hash) var tx_note = currentWallet.getUserNote(hash) @@ -111,23 +99,40 @@ ListView { } } + Rectangle { + anchors.right: parent.right + anchors.rightMargin: 15 * scaleRatio + anchors.top: parent.top + anchors.topMargin: parent.height/2 - this.height/2 + width: 30 * scaleRatio; height: 30 * scaleRatio + radius: 25 + color: "#FF4304" + + Image { + width: 20 * scaleRatio + height: 20 * scaleRatio + fillMode: Image.PreserveAspectFit + anchors.centerIn: parent + source: "qrc:///images/nextPage.png" + } + } ColumnLayout { id: tableContent // Date RowLayout { - Layout.topMargin: 10 * scaleRatio + Layout.topMargin: 20 * scaleRatio Layout.leftMargin: 10 * scaleRatio Text { font.family: "Arial" - font.pixelSize: 10 * scaleRatio + font.pixelSize: 14 * scaleRatio color: "#555555" text: date } Text { font.family: "Arial" - font.pixelSize: 10 * scaleRatio + font.pixelSize: 14 * scaleRatio color: "#555555" text: time } @@ -137,7 +142,7 @@ ListView { visible: confirmations < confirmationsRequired || isPending Layout.leftMargin: 5 * scaleRatio font.family: "Arial" - font.pixelSize: 10 * scaleRatio + font.pixelSize: 14 * scaleRatio color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454" text: { if (!isPending) @@ -158,7 +163,7 @@ ListView { spacing: 2 Text { font.family: "Arial" - font.pixelSize: 10 * scaleRatio + font.pixelSize: 14 * scaleRatio color: isOut ? "#FF4F41" : "#36B05B" text: isOut ? "↓" : "↑" } @@ -166,7 +171,7 @@ ListView { Text { id: amountText font.family: "Arial" - font.pixelSize: 14 * scaleRatio + font.pixelSize: 18 * scaleRatio color: isOut ? "#FF4F41" : "#36B05B" text: displayAmount } -- cgit v1.2.3 From 09461397a87d5d8c25cdd3cef9efbcde8184a7f2 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Nov 2017 07:53:14 +0100 Subject: Menu button color fix --- components/TitleBar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components') diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 531d5196..b8400273 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -60,7 +60,7 @@ Rectangle { property bool checked: false anchors.top: parent.top anchors.left: parent.left - color: basicMouseArea.containsMouse || !leftPanel.visible ? "#FFE00A" : "#000000" + color: "#FFE00A" height: 30 * scaleRatio width: height visible: isMobile -- cgit v1.2.3 From 4775a5b74da48e27f46f62d027f14cf235caabb2 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Nov 2017 19:51:53 +0100 Subject: mobile layout tweaks --- components/PasswordDialog.qml | 4 ++-- components/StandardButton.qml | 2 +- components/StandardDialog.qml | 5 +++-- main.qml | 5 +++-- pages/AddressBook.qml | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) (limited to 'components') diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index 51fc3913..b90e192b 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -89,7 +89,7 @@ Item { Layout.columnSpan: 2 Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter - font.pixelSize: 24 * scaleRatio + font.pixelSize: 18 * scaleRatio font.family: "Arial" color: "#555555" } @@ -165,7 +165,7 @@ Item { shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" pressedColor: "#FF4304" - text: qsTr("Ok") + text: qsTr("Continue") KeyNavigation.tab: cancelButton onClicked: { root.close() diff --git a/components/StandardButton.qml b/components/StandardButton.qml index 0ee722b5..6f714947 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -43,7 +43,7 @@ Item { signal clicked() // Dynamic label width - Layout.minimumWidth: (label.contentWidth + 10 * scaleRatio) // (label.contentWidth > 80)? label.contentWidth + 20 : 100 + Layout.minimumWidth: (label.contentWidth > 50)? label.contentWidth + 10 : 60 function doClick() { // Android workaround diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index 044c0a5c..84402147 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -97,7 +97,7 @@ Rectangle { Label { id: dialogTitle horizontalAlignment: Text.AlignHCenter - font.pixelSize: 32 * scaleRatio + font.pixelSize: 18 * scaleRatio font.family: "Arial" color: "#555555" } @@ -114,6 +114,7 @@ Rectangle { readOnly: true font.pixelSize: 12 * scaleRatio selectByMouse: false + wrapMode: TextEdit.Wrap MouseArea { anchors.fill: parent @@ -156,7 +157,7 @@ Rectangle { shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" pressedColor: "#FF4304" - text: qsTr("Ok") + text: qsTr("OK") KeyNavigation.tab: cancelButton onClicked: { root.close() diff --git a/main.qml b/main.qml index 809c0311..f8015c49 100644 --- a/main.qml +++ b/main.qml @@ -969,7 +969,7 @@ ApplicationWindow { // Confrirmation aka question dialog StandardDialog { - z:10 + z: parent.z + 1 id: transactionConfirmationPopup onAccepted: { close(); @@ -996,8 +996,9 @@ ApplicationWindow { } StandardDialog { - z:11 + z: parent.z + 1 id: confirmationDialog + anchors.fill: parent property var onAcceptedCallback property var onRejectedCallback onAccepted: { diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml index 29a18557..7904c594 100644 --- a/pages/AddressBook.qml +++ b/pages/AddressBook.qml @@ -53,7 +53,7 @@ Rectangle { RowLayout { StandardButton { id: qrfinderButton - text: qsTr("QRCODE") + translationManager.emptyString + text: qsTr("Qr Code") + translationManager.emptyString shadowReleasedColor: "#FF4304" shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" -- cgit v1.2.3