From 33b3685413ca037cdcd4ff8aa45b5abc88c60436 Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Sat, 8 May 2021 19:07:00 +0200 Subject: [PATCH] Visual alignment of elements and whitespace corrections --- src/qml/ErrorListPage.qml | 2 +- src/qml/GenericEntryDelegate.qml | 9 +++++---- src/qml/QueuePage.qml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/qml/ErrorListPage.qml b/src/qml/ErrorListPage.qml index c3e0a4a1..24918d38 100644 --- a/src/qml/ErrorListPage.qml +++ b/src/qml/ErrorListPage.qml @@ -55,7 +55,7 @@ Kirigami.ScrollablePage { opacity: 1 } Controls.Label { - text: i18n("Error code: ") + error.code + " · " + error.message + text: i18n("Error code: ") + error.code + (error.message ? " · " + error.message : "") Layout.fillWidth: true elide: Text.ElideRight font: Kirigami.Theme.smallFont diff --git a/src/qml/GenericEntryDelegate.qml b/src/qml/GenericEntryDelegate.qml index 5c01a5a1..0d65af6d 100644 --- a/src/qml/GenericEntryDelegate.qml +++ b/src/qml/GenericEntryDelegate.qml @@ -70,7 +70,7 @@ Kirigami.SwipeListItem { } Controls.Label { id: supertitle - text: (!isQueue && entry.queueStatus ? "· " : "") + entry.updated.toLocaleDateString(Qt.locale(), Locale.NarrowFormat) + (entry.enclosure ? ( entry.enclosure.size !== 0 ? " · " + Math.floor(entry.enclosure.size/(1024*1024)) + "MB" : "") : "" ) + text: (!isQueue && entry.queueStatus ? "· " : "") + 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 @@ -95,7 +95,7 @@ Kirigami.SwipeListItem { Layout.fillWidth: true elide: Text.ElideRight font: Kirigami.Theme.smallFont - opacity: 0.7 + opacity: entry.read ? 0.4 : 0.7 visible: !downloadProgress.visible } } @@ -116,19 +116,20 @@ Kirigami.SwipeListItem { text: audio.timeString(entry.enclosure.playPosition) elide: Text.ElideRight font: Kirigami.Theme.smallFont - opacity: 0.7 + opacity: entry.read ? 0.4 : 0.7 } Controls.ProgressBar { from: 0 to: entry.enclosure.duration value: entry.enclosure.playPosition / 1000 Layout.fillWidth: true + opacity: entry.read ? 0.6 : 1 } Controls.Label { text: audio.timeString(entry.enclosure.duration * 1000) elide: Text.ElideRight font: Kirigami.Theme.smallFont - opacity: 0.7 + opacity: entry.read ? 0.4 : 0.7 } } } diff --git a/src/qml/QueuePage.qml b/src/qml/QueuePage.qml index 5342846b..97003181 100644 --- a/src/qml/QueuePage.qml +++ b/src/qml/QueuePage.qml @@ -61,7 +61,7 @@ Kirigami.ScrollablePage { Controls.Label { Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter - text: i18np("1 episode", "%1 episodes", queueModel.rowCount()) + " · " + i18n("Time left") + ": " + audio.timeString(queueModel.timeLeft) + text: i18np("1 episode", "%1 episodes", queueModel.rowCount()) + " · " + i18n("Time left") + ": " + audio.timeString(queueModel.timeLeft) } Kirigami.Separator { Layout.fillWidth: true