aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/AddressBookTable.qml4
-rw-r--r--components/CheckBox.qml91
-rw-r--r--components/DaemonManagerDialog.qml2
-rw-r--r--components/HistoryTable.qml18
-rw-r--r--components/HistoryTableMobile.qml191
-rw-r--r--components/Input.qml2
-rw-r--r--components/Label.qml14
-rw-r--r--components/LineEdit.qml12
-rw-r--r--components/MenuButton.qml27
-rw-r--r--components/MobileHeader.qml42
-rw-r--r--components/NetworkStatusItem.qml63
-rw-r--r--components/PasswordDialog.qml66
-rw-r--r--components/ProcessingSplash.qml27
-rw-r--r--components/ProgressBar.qml93
-rw-r--r--components/QRCodeScanner.qml6
-rw-r--r--components/RemoteNodeEdit.qml60
-rw-r--r--components/StandardButton.qml26
-rw-r--r--components/StandardDialog.qml49
-rw-r--r--components/StandardDropdown.qml60
-rw-r--r--components/TickDelegate.qml2
-rw-r--r--components/TitleBar.qml15
21 files changed, 599 insertions, 271 deletions
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/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()
+ }
+ }
}
}
}
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 082822d3..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();
}
}
@@ -383,7 +375,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/components/HistoryTableMobile.qml b/components/HistoryTableMobile.qml
new file mode 100644
index 00000000..87545755
--- /dev/null
+++ b/components/HistoryTableMobile.qml
@@ -0,0 +1,191 @@
+// 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 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 = '<tr><td width="85" style="padding-top:5px"><b>',
+ trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
+ trEnd = "</td></tr>";
+
+ return '<table border="0">'
+ + (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 : "")
+ + "</table>"
+ + 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 + 20 * scaleRatio
+ width: listView.width
+ color: index % 2 ? "#F8F8F8" : "#FFFFFF"
+ Layout.leftMargin: 10 * scaleRatio
+ z: listView.count - index
+ function collapseDropdown() { dropdown.expanded = false }
+ MouseArea {
+ anchors.fill: parent
+ 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
+ }
+ }
+
+ 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: 20 * scaleRatio
+ Layout.leftMargin: 10 * scaleRatio
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 14 * scaleRatio
+ color: "#555555"
+ text: date
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 14 * scaleRatio
+ color: "#555555"
+ text: time
+ }
+
+ // Show confirmations
+ Text {
+ visible: confirmations < confirmationsRequired || isPending
+ Layout.leftMargin: 5 * scaleRatio
+ font.family: "Arial"
+ font.pixelSize: 14 * 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: 14 * scaleRatio
+ color: isOut ? "#FF4F41" : "#36B05B"
+ text: isOut ? "↓" : "↑"
+ }
+
+ Text {
+ id: amountText
+ font.family: "Arial"
+ font.pixelSize: 18 * scaleRatio
+ color: isOut ? "#FF4F41" : "#36B05B"
+ text: displayAmount
+ }
+ }
+ }
+ }
+
+ ListModel {
+ id: dropModel
+ ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
+ ListElement { name: "<b>Add to address book</b>"; icon: "../images/dropdownAdd.png" }
+ ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
+ ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
+ }
+
+ Clipboard { id: clipboard }
+}
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"
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..23ab4f74 100644
--- a/components/MenuButton.qml
+++ b/components/MenuButton.qml
@@ -38,11 +38,18 @@ Rectangle {
property var under: null
signal clicked()
+ function doClick() {
+ // Android workaround
+ releaseFocus();
+ clicked();
+ }
+
+
function getOffset() {
var offset = 0
var item = button
while (item.under) {
- offset += 20
+ offset += 20 * scaleRatio
item = item.under
}
return offset
@@ -50,7 +57,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 +83,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 +105,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 +124,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 +133,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"
}
@@ -139,7 +146,7 @@ Rectangle {
onClicked: {
if(parent.checked)
return
- button.clicked()
+ button.doClick()
parent.checked = true
}
}
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..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)
@@ -60,37 +62,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..b90e192b 100644
--- a/components/PasswordDialog.qml
+++ b/components/PasswordDialog.qml
@@ -35,40 +35,48 @@ 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: 480
- 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 }
+ anchors { fill: parent; margins: 35 * scaleRatio }
ColumnLayout {
id: column
@@ -81,20 +89,20 @@ Window {
Layout.columnSpan: 2
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 24
+ font.pixelSize: 18 * 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
@@ -128,27 +136,18 @@ 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 {
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,13 +161,11 @@ Window {
}
MoneroComponents.StandardButton {
id: okButton
- width: 120
- fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
- text: qsTr("Ok")
+ text: qsTr("Continue")
KeyNavigation.tab: cancelButton
onClicked: {
root.close()
@@ -178,6 +175,3 @@ Window {
}
}
}
-
-
-
diff --git a/components/ProcessingSplash.qml b/components/ProcessingSplash.qml
index 2f6725db..d7fbd5cb 100644
--- a/components/ProcessingSplash.qml
+++ b/components/ProcessingSplash.qml
@@ -31,17 +31,26 @@ 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
- width: 200
- height: 100
+ width: 200 * scaleRatio
+ height: 100 * scaleRatio
opacity: 0.7
+ function show() {
+ root.visible = true;
+ }
+
+ function close() {
+ root.visible = false;
+ }
+
ColumnLayout {
id: rootLayout
@@ -49,8 +58,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 +70,7 @@ Window {
id: messageTitle
text: "Please wait..."
font {
- pixelSize: 22
+ pixelSize: 22 * scaleRatio
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
@@ -72,7 +81,7 @@ Window {
Text {
id: heightProgress
font {
- pixelSize: 18
+ pixelSize: 18 * scaleRatio
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
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
+ }
}
}
+
}
+
+
}
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"
}
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()
+ }
+}
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index 33cedee7..6f714947 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -31,19 +31,25 @@ import QtQuick.Layouts 1.1
Item {
id: button
- height: 37
- property string shadowPressedColor
- property string shadowReleasedColor
- property string pressedColor
- property string releasedColor
+ height: 37 * scaleRatio
+ 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
+ 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 > 50)? label.contentWidth + 10 : 60
+
+ function doClick() {
+ // Android workaround
+ releaseFocus();
+ clicked();
+ }
Rectangle {
anchors.left: parent.left
@@ -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()
}
diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml
index 681c2d3d..84402147 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,12 +65,24 @@ Window {
}
function open() {
+ // Center
+ if(!isMobile) {
+ root.x = parent.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
- width: 480
- height: 280
+ width: isMobile ? screenWidth : 480
+ height: isMobile ? screenHeight : 280
ColumnLayout {
id: mainLayout
@@ -84,7 +97,7 @@ Window {
Label {
id: dialogTitle
horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 32
+ font.pixelSize: 18 * scaleRatio
font.family: "Arial"
color: "#555555"
}
@@ -99,7 +112,23 @@ Window {
font.family: "Arial"
textFormat: TextEdit.AutoText
readOnly: true
- font.pixelSize: 12
+ font.pixelSize: 12 * scaleRatio
+ selectByMouse: false
+ wrapMode: TextEdit.Wrap
+
+ 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)
+ }
+ }
}
}
@@ -111,8 +140,6 @@ Window {
MoneroComponents.StandardButton {
id: cancelButton
- width: 120
- fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
@@ -126,13 +153,11 @@ Window {
MoneroComponents.StandardButton {
id: okButton
- width: 120
- fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
- text: qsTr("Ok")
+ text: qsTr("OK")
KeyNavigation.tab: cancelButton
onClicked: {
root.close()
diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml
index 50b60fe0..5aac249b 100644
--- a/components/StandardDropdown.qml
+++ b/components/StandardDropdown.qml
@@ -38,7 +38,10 @@ Item {
property string textColor: "#FFFFFF"
property alias currentIndex: column.currentIndex
property bool expanded: false
- height: 37
+
+ signal changed();
+
+ height: 37 * scaleRatio
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
function hide() { dropdown.expanded = false }
@@ -54,12 +57,18 @@ 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
anchors.right: parent.right
anchors.top: parent.top
- height: 37
+ height: 37 * scaleRatio
Rectangle {
anchors.left: parent.left
@@ -82,8 +91,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 +100,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,26 +110,23 @@ 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 : ""
}
Text {
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 : ""
-
property int w: 0
Component.onCompleted: w = implicitWidth
}
@@ -129,7 +135,7 @@ Item {
id: separator
anchors.right: dropIndicator.left
anchors.verticalCenter: parent.verticalCenter
- height: 18
+ height: 18 * scaleRatio
width: 1
color: "#FFFFFF"
}
@@ -139,12 +145,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 +174,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 +215,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 +223,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 +236,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 +246,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
}
@@ -258,6 +264,8 @@ Item {
onClicked: {
dropdown.expanded = false
column.currentIndex = index
+ changed();
+ dropdown.update()
}
}
}
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..b8400273 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
@@ -37,7 +38,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
@@ -53,21 +54,22 @@ Rectangle {
}
Rectangle {
+
id: goToBasicVersionButton
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
property bool checked: false
anchors.top: parent.top
anchors.left: parent.left
- color: basicMouseArea.containsMouse || !leftPanel.visible ? "#FFE00A" : "#000000"
- height: 30
+ color: "#FFE00A"
+ height: 30 * scaleRatio
width: height
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)
}