From a46ab103afded840883b631e3775f4bcec9dcb1e Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Wed, 27 Sep 2023 13:33:40 +0200 Subject: [PATCH] Rework delegates to use latest kirigami(-addons) features --- src/qml/ChapterListDelegate.qml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qml/ChapterListDelegate.qml b/src/qml/ChapterListDelegate.qml index fbbe53a8..a9f24a57 100644 --- a/src/qml/ChapterListDelegate.qml +++ b/src/qml/ChapterListDelegate.qml @@ -9,13 +9,14 @@ import QtQuick.Controls as Controls import QtQuick.Layouts import org.kde.kirigami as Kirigami -import org.kde.kirigamiaddons.delegates as Delegates +import org.kde.kirigami.delegates as Delegates +import org.kde.kirigamiaddons.delegates as AddonDelegates import org.kde.kmediasession import org.kde.kasts -Delegates.RoundedItemDelegate { +AddonDelegates.RoundedItemDelegate { id: root property var entry: undefined @@ -23,14 +24,14 @@ Delegates.RoundedItemDelegate { property bool streamingButtonVisible: entry != undefined && entry.enclosure && (entry.enclosure.status !== Enclosure.Downloaded) && NetworkConnectionManager.streamingAllowed && (SettingsManager.prioritizeStreaming || AudioManager.entry === entry) - text: model.title - icon.source: model.chapter.cachedImage - contentItem: RowLayout { - Delegates.SubtitleContentItem { - itemDelegate: root + Delegates.IconTitleSubtitle { + icon.source: model.chapter.cachedImage + title: model.title subtitle: model.formattedStart + Layout.fillWidth: true } + Controls.ToolButton { icon.name: streamingButtonVisible ? "media-playback-cloud" : "media-playback-start" text: i18n("Play")