mirror of
https://github.com/KDE/kasts.git
synced 2024-12-26 16:33:14 +01:00
Rework delegates to use latest kirigami(-addons) features
This commit is contained in:
parent
af0616e71a
commit
a46ab103af
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user