From 207be0e03b18ca2af4949f44b6f8bcadd6220695 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 9 Feb 2016 10:29:49 +0100 Subject: Made the maillist a bit easier to look at. --- .../kube-mail/package/contents/ui/MailListView.qml | 40 ++++++++++++---------- 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 import QtQuick.Controls 1.3 import QtQuick.Layouts 1.1 +import QtQml 2.2 + import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kube.mail 1.0 as Mail @@ -57,10 +59,11 @@ ScrollView { anchors.fill: parent - color: colorPalette.read + // color: colorPalette.read + color: "steelblue" opacity: 0.1 - visible: model.unread == false + visible: model.unread } Avatar { @@ -92,21 +95,22 @@ ScrollView { font.weight: Font.DemiBold } - Label { - id: sender - - anchors { - top: avatar.top - left: senderName.right - leftMargin: unit.size - right: date.left - rightMargin: unit.size - } - - text: "(" + model.sender +")" - - clip: true - } + //The name currently contains both name and address + // Label { + // id: sender + // + // anchors { + // top: avatar.top + // left: senderName.right + // leftMargin: unit.size + // right: date.left + // rightMargin: unit.size + // } + // + // text: "(" + model.sender +")" + // + // clip: true + // } Label { id: date @@ -117,7 +121,7 @@ ScrollView { rightMargin: unit.size * 2 } - text: model.date + text: Qt.formatDateTime(model.date) font.weight: Font.Light } 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 case Date: return srcIdx.sibling(srcIdx.row(), 3).data(Qt::DisplayRole).toString(); case Unread: - return srcIdx.sibling(srcIdx.row(), 4).data(Qt::DisplayRole).toString(); + return srcIdx.sibling(srcIdx.row(), 4).data(Qt::DisplayRole).toBool(); case Important: - return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toString(); + return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toBool(); case Id: return srcIdx.data(Sink::Store::DomainObjectBaseRole).value()->identifier(); case DomainObject: -- cgit v1.2.3