diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-24 12:59:23 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-24 12:59:23 +0200 |
commit | acf2a53fea8fdbe366627e45fffe87434e3c2e7e (patch) | |
tree | f241beb77b302df6967b34d7297f55f23eaf6dea /framework/qml/AttachmentDelegate.qml | |
parent | 9ed658053d5d41f4bf8c83072e6fa62990bd7ad8 (diff) | |
download | kube-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.qml | 33 |
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 | ||
19 | import QtQuick 2.7 | 19 | import QtQuick 2.7 |
20 | import QtQuick.Layouts 1.1 | ||
21 | import org.kde.kirigami 1.0 as Kirigami | ||
22 | import org.kube.framework 1.0 as Kube | 20 | import org.kube.framework 1.0 as Kube |
23 | 21 | ||
24 | Item { | 22 | Item { |
@@ -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 | } |