Add setting to show title overlay on FeedListDelegate images

This commit is contained in:
Bart De Vries 2021-05-11 16:49:06 +02:00
parent 0fc8cca3ef
commit cce0afd3a0
3 changed files with 43 additions and 26 deletions

View File

@ -68,39 +68,40 @@ Item {
anchors.fill: parent
source: "rss"
}
}
}
Component {
id: imageText
Item {
Rectangle {
anchors.fill: header
opacity: 0.5
color: "black"
}
Kirigami.Heading {
id: header
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
padding: 10
text: root.imageTitle
level: 3
color: "white"
wrapMode: Text.Wrap
elide: Text.ElideRight
}
}
Component {
id: imageText
Item {
Rectangle {
anchors.fill: header
opacity: 0.5
color: "black"
}
Loader {
anchors.fill: parent
active: root.imageTitle !== ""
sourceComponent: imageText
Kirigami.Heading {
id: header
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
padding: 10
text: root.imageTitle
level: 3
font.bold: true
color: "white"
wrapMode: Text.Wrap
elide: Text.ElideRight
}
}
}
Loader {
anchors.fill: parent
active: root.imageTitle !== "" && (SettingsManager.alwaysShowFeedTitles ? true : (imageSource === "no-image" || imageSource === "fetching"))
sourceComponent: imageText
}
Component {
id: loaderSymbol
Item {

View File

@ -54,6 +54,18 @@ Kirigami.ScrollablePage {
onToggled: SettingsManager.autoDownload = checked
}
Kirigami.Heading {
Kirigami.FormData.isSection: true
text: i18n("Appearance")
}
Controls.CheckBox {
id: alwaysShowFeedTitles
checked: SettingsManager.alwaysShowFeedTitles
text: i18n("Always show feed titles in subscription view")
onToggled: SettingsManager.alwaysShowFeedTitles = checked
}
Kirigami.Heading {
Kirigami.FormData.isSection: true
text: i18n("Article")

View File

@ -17,6 +17,10 @@
<label>Automatically download new episodes</label>
<default>false</default>
</entry>
<entry name="alwaysShowFeedTitles" type="Bool">
<label>Always show the title of podcast feeds in subscription view</label>
<default>false</default>
</entry>
<entry name="toggleRemainingTime" type="Bool">
<label>Whether the player shows remaining track time instead of total track time</label>
<default>false</default>