summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui
diff options
context:
space:
mode:
Diffstat (limited to 'components/package/contents/ui')
-rw-r--r--components/package/contents/ui/MailListView.qml61
1 files changed, 11 insertions, 50 deletions
diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml
index e7fc634f..efe2b901 100644
--- a/components/package/contents/ui/MailListView.qml
+++ b/components/package/contents/ui/MailListView.qml
@@ -16,17 +16,15 @@
16 */ 16 */
17 17
18import QtQuick 2.4 18import QtQuick 2.4
19import QtQuick.Controls 1.4 19import QtQuick.Controls 1.4 as Controls
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
21 21
22import QtQml 2.2 22import org.kde.kirigami 1.0 as Kirigami
23
24import org.kde.plasma.components 2.0 as PlasmaComponents
25 23
26import org.kube.framework.domain 1.0 as KubeFramework 24import org.kube.framework.domain 1.0 as KubeFramework
27import org.kube.framework.theme 1.0 25import org.kube.framework.theme 1.0
28 26
29ScrollView { 27Controls.ScrollView {
30 id: root 28 id: root
31 property variant parentFolder 29 property variant parentFolder
32 property variant currentMail 30 property variant currentMail
@@ -46,37 +44,17 @@ ScrollView {
46 } 44 }
47 focus: true 45 focus: true
48 46
49 delegate: PlasmaComponents.ListItem { 47 delegate: Kirigami.AbstractListItem {
50 width: listView.width 48 width: listView.width
51 height: Unit.size * 12 49 height: Unit.size * 12
52 50
53 enabled: true 51 enabled: true
52 supportsMouseEvents: true
54 checked: listView.currentIndex == index 53 checked: listView.currentIndex == index
55 54
56 Binding { 55 onClicked: {
57 target: root 56 listView.currentIndex = model.index
58 property: "currentMail" 57 root.currentMail = model.domainObject
59 when: listView.currentIndex == index
60 value: model.domainObject
61 }
62
63 MouseArea {
64 anchors.fill: parent
65
66 onClicked: {
67 listView.currentIndex = model.index
68 }
69 }
70
71 Rectangle {
72 id: unread
73
74 anchors.fill: parent
75
76 color: "steelblue"
77 opacity: 0.1
78
79 visible: model.unread
80 } 58 }
81 59
82 Avatar { 60 Avatar {
@@ -94,7 +72,7 @@ ScrollView {
94 name: model.senderName 72 name: model.senderName
95 } 73 }
96 74
97 Label { 75 Controls.Label {
98 id: senderName 76 id: senderName
99 77
100 anchors { 78 anchors {
@@ -108,24 +86,7 @@ ScrollView {
108 font.weight: Font.DemiBold 86 font.weight: Font.DemiBold
109 } 87 }
110 88
111 //The name currently contains both name and address 89 Controls.Label {
112 // Label {
113 // id: sender
114 //
115 // anchors {
116 // top: avatar.top
117 // left: senderName.right
118 // leftMargin: Unit.size
119 // right: date.left
120 // rightMargin: Unit.size
121 // }
122 //
123 // text: "(" + model.sender +")"
124 //
125 // clip: true
126 // }
127
128 Label {
129 id: date 90 id: date
130 91
131 anchors { 92 anchors {
@@ -139,7 +100,7 @@ ScrollView {
139 font.weight: Font.Light 100 font.weight: Font.Light
140 } 101 }
141 102
142 Label { 103 Controls.Label {
143 id: subject 104 id: subject
144 105
145 anchors { 106 anchors {