aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/DashboardTable.qml34
-rw-r--r--components/TableDropdown.qml14
-rw-r--r--components/TitleBar.qml9
3 files changed, 41 insertions, 16 deletions
diff --git a/components/DashboardTable.qml b/components/DashboardTable.qml
index cbd1c8d0..1b0d0f69 100644
--- a/components/DashboardTable.qml
+++ b/components/DashboardTable.qml
@@ -1,5 +1,6 @@
import QtQuick 2.0
import "../components"
+import moneroComponents 1.0
ListView {
id: listView
@@ -36,30 +37,39 @@ ListView {
}
Text {
- id: paymentIdText
- width: text.length ? 120 : 0
+ id: descriptionText
+ width: text.length ? (descriptionArea.containsMouse ? parent.width - x - 12 : 120) : 0
anchors.verticalCenter: dot.verticalCenter
font.family: "Arial"
font.bold: true
font.pixelSize: 19
color: "#444444"
elide: Text.ElideRight
- text: paymentId
+ text: description
+
+ MouseArea {
+ id: descriptionArea
+ anchors.fill: parent
+ hoverEnabled: true
+ }
}
Item { //separator
- width: paymentIdText.width ? 12 : 0
+ width: descriptionText.width ? 12 : 0
height: 14
+ visible: !descriptionArea.containsMouse
}
Text {
+ id: addressText
anchors.verticalCenter: dot.verticalCenter
width: parent.width - x - 12
elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
- text: description.length > 0 ? description : address
+ text: address
+ visible: !descriptionArea.containsMouse
}
}
@@ -173,12 +183,22 @@ ListView {
color: "#DBDBDB"
}
+ 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 same destination</b>"; icon: "../images/dropdownSend.png" }
+ ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
+ }
+
+ Clipboard { id: clipboard }
TableDropdown {
id: dropdown
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 11
anchors.rightMargin: 5
+ dataModel: dropModel
onExpandedChanged: {
if(listView.previousItem !== undefined && listView.previousItem !== delegate)
listView.previousItem.collapseDropdown()
@@ -189,6 +209,10 @@ ListView {
}
}
onCollapsed: delegate.z = 0
+ onOptionClicked: {
+ if(option === 0)
+ clipboard.setText(address)
+ }
}
}
}
diff --git a/components/TableDropdown.qml b/components/TableDropdown.qml
index 17b4bc93..69728a73 100644
--- a/components/TableDropdown.qml
+++ b/components/TableDropdown.qml
@@ -3,8 +3,9 @@ import QtQuick 2.0
Item {
id: dropdown
property bool expanded: false
+ property alias dataModel: repeater.model
signal collapsed()
- signal optionClicked(int index)
+ signal optionClicked(int option)
width: 72
height: 37
@@ -115,17 +116,8 @@ Item {
anchors.right: parent.right
anchors.top: parent.top
- ListModel {
- id: dataModel
- ListElement { name: "<b>Add to adress book</b>"; icon: "../images/dropdownOption1.png" }
- ListElement { name: "<b>Send to same destination</b>"; icon: "../images/dropdownSend.png" }
- ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
- }
-
Repeater {
id: repeater
- model: dataModel
-
delegate: Rectangle {
id: delegate
anchors.left: parent.left
@@ -163,7 +155,7 @@ Item {
anchors.fill: parent
propagateComposedEvents: true
onEntered: {
- var pos = appWindow.mapFromItem(delegate, 30, -20)
+ var pos = rootItem.mapFromItem(delegate, 30, -20)
tipItem.text = name
tipItem.x = pos.x
if(tipItem.height > 30)
diff --git a/components/TitleBar.qml b/components/TitleBar.qml
index 5db8b7e1..c4f2dab5 100644
--- a/components/TitleBar.qml
+++ b/components/TitleBar.qml
@@ -8,6 +8,15 @@ Rectangle {
y: -height
property int mouseX: 0
property int mouseY: 0
+
+ Text {
+ anchors.centerIn: parent
+ font.family: "Arial"
+ font.pixelSize: 15
+ font.letterSpacing: -1
+ color: "#FFFFFF"
+ text: qsTr("Monero")
+ }
Behavior on y {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }