summaryrefslogtreecommitdiffstats
path: root/framework/qml/AttachmentDelegate.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-24 12:59:23 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-24 12:59:23 +0200
commitacf2a53fea8fdbe366627e45fffe87434e3c2e7e (patch)
treef241beb77b302df6967b34d7297f55f23eaf6dea /framework/qml/AttachmentDelegate.qml
parent9ed658053d5d41f4bf8c83072e6fa62990bd7ad8 (diff)
downloadkube-acf2a53fea8fdbe366627e45fffe87434e3c2e7e.tar.gz
kube-acf2a53fea8fdbe366627e45fffe87434e3c2e7e.zip
Attachment open and download buttons
We'll need proper icons though.
Diffstat (limited to 'framework/qml/AttachmentDelegate.qml')
-rw-r--r--framework/qml/AttachmentDelegate.qml33
1 files changed, 22 insertions, 11 deletions
diff --git a/framework/qml/AttachmentDelegate.qml b/framework/qml/AttachmentDelegate.qml
index 994afd8c..081baf5d 100644
--- a/framework/qml/AttachmentDelegate.qml
+++ b/framework/qml/AttachmentDelegate.qml
@@ -17,8 +17,6 @@
17 */ 17 */
18 18
19import QtQuick 2.7 19import QtQuick 2.7
20import QtQuick.Layouts 1.1
21import org.kde.kirigami 1.0 as Kirigami
22import org.kube.framework 1.0 as Kube 20import org.kube.framework 1.0 as Kube
23 21
24Item { 22Item {
@@ -26,9 +24,11 @@ Item {
26 24
27 property string name 25 property string name
28 property string icon 26 property string icon
27 signal open;
28 signal download;
29 29
30 width: content.width + Kirigami.Units.gridUnit / 2 30 width: content.width + Kube.Units.gridUnit / 2
31 height: content.height + Kirigami.Units.gridUnit / 2 31 height: content.height + Kube.Units.gridUnit / 2
32 32
33 Rectangle { 33 Rectangle {
34 anchors.fill: parent 34 anchors.fill: parent
@@ -37,26 +37,25 @@ Item {
37 color: Kube.Colors.disabledTextColor 37 color: Kube.Colors.disabledTextColor
38 } 38 }
39 39
40 RowLayout { 40 Row {
41 id: content 41 id: content
42 42
43 anchors.centerIn: parent 43 anchors.centerIn: parent
44 44
45 spacing: Kirigami.Units.smallSpacing 45 spacing: Kube.Units.smallSpacing
46 46
47 Rectangle { 47 Rectangle {
48 id: mimetype 48 id: mimetype
49 49
50 height: Kirigami.Units.gridUnit 50 height: Kube.Units.gridUnit
51 width: Kirigami.Units.gridUnit 51 width: Kube.Units.gridUnit
52 52
53 color: Kube.Colors.backgroundColor 53 color: Kube.Colors.backgroundColor
54 54
55 Kirigami.Icon { 55 Kube.Icon {
56 height: parent.height 56 height: parent.height
57 width: height 57 width: height
58 58 iconName: root.icon
59 source: root.icon
60 } 59 }
61 } 60 }
62 61
@@ -64,5 +63,17 @@ Item {
64 text: root.name 63 text: root.name
65 color: Kube.Colors.backgroundColor 64 color: Kube.Colors.backgroundColor
66 } 65 }
66 Kube.IconButton {
67 height: parent.height
68 width: height
69 iconName: Kube.Icons.goDown
70 onClicked: root.download()
71 }
72 Kube.IconButton {
73 height: parent.height
74 width: height
75 iconName: Kube.Icons.edit
76 onClicked: root.open()
77 }
67 } 78 }
68} 79}