mirror of https://github.com/KDE/kasts.git
Add switch to display Podcast image instead of Episode image
Closes #46
This commit is contained in:
parent
48a10a25cc
commit
37a8465c7f
|
@ -98,6 +98,7 @@ Kirigami.ScrollablePage {
|
|||
model: page.feed.entries ? page.feed.entries : emptyListModel
|
||||
delegate: GenericEntryDelegate {
|
||||
listViewObject: entryList
|
||||
showFeedImage: false
|
||||
}
|
||||
|
||||
header: ColumnLayout {
|
||||
|
|
|
@ -26,6 +26,7 @@ AddonDelegates.RoundedItemDelegate {
|
|||
|
||||
property bool isQueue: false
|
||||
property bool isDownloads: false
|
||||
property bool showFeedImage: !SettingsManager.showEpisodeImage
|
||||
property QtObject listViewObject: undefined
|
||||
property bool selected: false
|
||||
property int row: model ? model.row : -1
|
||||
|
@ -195,7 +196,7 @@ AddonDelegates.RoundedItemDelegate {
|
|||
|
||||
ImageWithFallback {
|
||||
id: img
|
||||
imageSource: entry ? entry.cachedImage : "no-image"
|
||||
imageSource: entry ? ( showFeedImage ? entry.feed.cachedImage : entry.cachedImage ) : "no-image"
|
||||
property int size: Kirigami.Units.gridUnit * 3
|
||||
Layout.preferredHeight: size
|
||||
Layout.preferredWidth: size
|
||||
|
|
|
@ -53,6 +53,19 @@ FormCard.FormCardPage {
|
|||
SettingsManager.save();
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {}
|
||||
|
||||
FormCard.FormCheckDelegate {
|
||||
id: showEpisodeImage
|
||||
text: i18nc("@option:check", "Show episode image instead of podcast image in lists")
|
||||
checked: SettingsManager.showEpisodeImage
|
||||
onToggled: {
|
||||
SettingsManager.showEpisodeImage = checked;
|
||||
SettingsManager.save();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FormCard.FormHeader {
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
<label>Always show the title of podcast feeds in subscription view</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="showEpisodeImage" type="Bool">
|
||||
<label>Show the image of the episode rather than the general podcast image</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="prioritizeStreaming" type="Bool">
|
||||
<label>Show streaming button instead of download button</label>
|
||||
<default>false</default>
|
||||
|
|
Loading…
Reference in New Issue