From 61e3af704bc81f04b540d3bc9b417aabcc879058 Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Fri, 9 Apr 2021 22:16:15 +0200 Subject: [PATCH] Add "new" label also to queue entries --- src/qml/QueueDelegate.qml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/qml/QueueDelegate.qml b/src/qml/QueueDelegate.qml index 28ad42ca..0ab1d85c 100644 --- a/src/qml/QueueDelegate.qml +++ b/src/qml/QueueDelegate.qml @@ -37,12 +37,22 @@ Kirigami.SwipeListItem { spacing: Kirigami.Units.smallSpacing Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter - Controls.Label { - text: entry.updated.toLocaleDateString(Qt.locale(), Locale.NarrowFormat) + (entry.enclosure ? ( entry.enclosure.size !== 0 ? " · " + Math.floor(entry.enclosure.size/(1024*1024)) + "MB" : "") : "" ) - Layout.fillWidth: true - elide: Text.ElideRight - font: Kirigami.Theme.smallFont - opacity: 0.7 + RowLayout{ + Controls.Label { + text: entry.new ? i18n("new") + " ·" : "" + font.capitalization: Font.AllUppercase + color: Kirigami.Theme.highlightColor + visible: entry.new + opacity: (entry.read) ? 0.4 : 0.7 + } + Controls.Label { + id: supertitle + text: entry.updated.toLocaleDateString(Qt.locale(), Locale.NarrowFormat) + (entry.enclosure ? ( entry.enclosure.size !== 0 ? " · " + Math.floor(entry.enclosure.size/(1024*1024)) + "MB" : "") : "" ) + Layout.fillWidth: true + elide: Text.ElideRight + font: Kirigami.Theme.smallFont + opacity: (entry.read) ? 0.4 : 0.7 + } } Controls.Label { text: entry.title