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
|
model: page.feed.entries ? page.feed.entries : emptyListModel
|
||||||
delegate: GenericEntryDelegate {
|
delegate: GenericEntryDelegate {
|
||||||
listViewObject: entryList
|
listViewObject: entryList
|
||||||
|
showFeedImage: false
|
||||||
}
|
}
|
||||||
|
|
||||||
header: ColumnLayout {
|
header: ColumnLayout {
|
||||||
|
|
|
@ -26,6 +26,7 @@ AddonDelegates.RoundedItemDelegate {
|
||||||
|
|
||||||
property bool isQueue: false
|
property bool isQueue: false
|
||||||
property bool isDownloads: false
|
property bool isDownloads: false
|
||||||
|
property bool showFeedImage: !SettingsManager.showEpisodeImage
|
||||||
property QtObject listViewObject: undefined
|
property QtObject listViewObject: undefined
|
||||||
property bool selected: false
|
property bool selected: false
|
||||||
property int row: model ? model.row : -1
|
property int row: model ? model.row : -1
|
||||||
|
@ -195,7 +196,7 @@ AddonDelegates.RoundedItemDelegate {
|
||||||
|
|
||||||
ImageWithFallback {
|
ImageWithFallback {
|
||||||
id: img
|
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
|
property int size: Kirigami.Units.gridUnit * 3
|
||||||
Layout.preferredHeight: size
|
Layout.preferredHeight: size
|
||||||
Layout.preferredWidth: size
|
Layout.preferredWidth: size
|
||||||
|
|
|
@ -53,6 +53,19 @@ FormCard.FormCardPage {
|
||||||
SettingsManager.save();
|
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 {
|
FormCard.FormHeader {
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
<label>Always show the title of podcast feeds in subscription view</label>
|
<label>Always show the title of podcast feeds in subscription view</label>
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
</entry>
|
</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">
|
<entry name="prioritizeStreaming" type="Bool">
|
||||||
<label>Show streaming button instead of download button</label>
|
<label>Show streaming button instead of download button</label>
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
|
|
Loading…
Reference in New Issue