diff options
-rw-r--r-- | applications/kube-mail/package/contents/ui/MailListView.qml | 40 | ||||
-rw-r--r-- | framework/mail/maillistmodel.cpp | 4 |
2 files changed, 24 insertions, 20 deletions
diff --git a/applications/kube-mail/package/contents/ui/MailListView.qml b/applications/kube-mail/package/contents/ui/MailListView.qml index 5fb4678c..5e830b73 100644 --- a/applications/kube-mail/package/contents/ui/MailListView.qml +++ b/applications/kube-mail/package/contents/ui/MailListView.qml | |||
@@ -19,6 +19,8 @@ import QtQuick 2.4 | |||
19 | import QtQuick.Controls 1.3 | 19 | import QtQuick.Controls 1.3 |
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | 21 | ||
22 | import QtQml 2.2 | ||
23 | |||
22 | import org.kde.plasma.components 2.0 as PlasmaComponents | 24 | import org.kde.plasma.components 2.0 as PlasmaComponents |
23 | 25 | ||
24 | import org.kde.kube.mail 1.0 as Mail | 26 | import org.kde.kube.mail 1.0 as Mail |
@@ -57,10 +59,11 @@ ScrollView { | |||
57 | 59 | ||
58 | anchors.fill: parent | 60 | anchors.fill: parent |
59 | 61 | ||
60 | color: colorPalette.read | 62 | // color: colorPalette.read |
63 | color: "steelblue" | ||
61 | opacity: 0.1 | 64 | opacity: 0.1 |
62 | 65 | ||
63 | visible: model.unread == false | 66 | visible: model.unread |
64 | } | 67 | } |
65 | 68 | ||
66 | Avatar { | 69 | Avatar { |
@@ -92,21 +95,22 @@ ScrollView { | |||
92 | font.weight: Font.DemiBold | 95 | font.weight: Font.DemiBold |
93 | } | 96 | } |
94 | 97 | ||
95 | Label { | 98 | //The name currently contains both name and address |
96 | id: sender | 99 | // Label { |
97 | 100 | // id: sender | |
98 | anchors { | 101 | // |
99 | top: avatar.top | 102 | // anchors { |
100 | left: senderName.right | 103 | // top: avatar.top |
101 | leftMargin: unit.size | 104 | // left: senderName.right |
102 | right: date.left | 105 | // leftMargin: unit.size |
103 | rightMargin: unit.size | 106 | // right: date.left |
104 | } | 107 | // rightMargin: unit.size |
105 | 108 | // } | |
106 | text: "(" + model.sender +")" | 109 | // |
107 | 110 | // text: "(" + model.sender +")" | |
108 | clip: true | 111 | // |
109 | } | 112 | // clip: true |
113 | // } | ||
110 | 114 | ||
111 | Label { | 115 | Label { |
112 | id: date | 116 | id: date |
@@ -117,7 +121,7 @@ ScrollView { | |||
117 | rightMargin: unit.size * 2 | 121 | rightMargin: unit.size * 2 |
118 | } | 122 | } |
119 | 123 | ||
120 | text: model.date | 124 | text: Qt.formatDateTime(model.date) |
121 | 125 | ||
122 | font.weight: Font.Light | 126 | font.weight: Font.Light |
123 | } | 127 | } |
diff --git a/framework/mail/maillistmodel.cpp b/framework/mail/maillistmodel.cpp index 95534cec..3ff8efc4 100644 --- a/framework/mail/maillistmodel.cpp +++ b/framework/mail/maillistmodel.cpp | |||
@@ -71,9 +71,9 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const | |||
71 | case Date: | 71 | case Date: |
72 | return srcIdx.sibling(srcIdx.row(), 3).data(Qt::DisplayRole).toString(); | 72 | return srcIdx.sibling(srcIdx.row(), 3).data(Qt::DisplayRole).toString(); |
73 | case Unread: | 73 | case Unread: |
74 | return srcIdx.sibling(srcIdx.row(), 4).data(Qt::DisplayRole).toString(); | 74 | return srcIdx.sibling(srcIdx.row(), 4).data(Qt::DisplayRole).toBool(); |
75 | case Important: | 75 | case Important: |
76 | return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toString(); | 76 | return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toBool(); |
77 | case Id: | 77 | case Id: |
78 | return srcIdx.data(Sink::Store::DomainObjectBaseRole).value<Sink::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); | 78 | return srcIdx.data(Sink::Store::DomainObjectBaseRole).value<Sink::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); |
79 | case DomainObject: | 79 | case DomainObject: |