Fix the wrapping of entry heading and description and replace emojis with icons

This commit is contained in:
Suraj Kumar Mahto 2021-03-31 14:43:53 +00:00 committed by Tobias Fella
parent 8895fcc5a9
commit b618229843
3 changed files with 24 additions and 3 deletions

View File

@ -93,12 +93,18 @@ Kirigami.ScrollablePage {
ColumnLayout {
Kirigami.Heading {
text: page.feed.name
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Controls.Label {
text: page.feed.description
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Controls.Label {
text: page.feed.authors.length === 0 ? "" : " " + i18nc("by <author(s)>", "by") + " " + page.feed.authors[0].name
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
}

View File

@ -27,27 +27,41 @@ Kirigami.ScrollablePage {
}
Kirigami.Heading {
text: feed.name
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Kirigami.Heading {
text: feed.description;
level: 3
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Controls.Label {
text: i18nc("by <author(s)>", "by %1", feed.authors[0].name)
visible: feed.authors.length !== 0
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Controls.Label {
text: "<a href='%1'>%1</a>".arg(feed.link)
onLinkActivated: Qt.openUrlExternally(link)
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Controls.Label {
text: i18n("Subscribed since: %1", feed.subscribed.toLocaleString(Qt.locale(), Locale.ShortFormat))
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Controls.Label {
text: i18n("last updated: %1", feed.lastUpdated.toLocaleString(Qt.locale(), Locale.ShortFormat))
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Controls.Label {
text: i18n("%1 posts, %2 unread", feed.entryCount, feed.unreadEntryCount)
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
}

View File

@ -25,11 +25,11 @@ Kirigami.Page {
initialIndex: 1
Kirigami.Page {
property var entry: podcastPlayerPage.entry
Component.onCompleted: audio.entry = entry
title: "▶️"
icon.name: "media-playback-start"
title: "Play"
ColumnLayout {
anchors.fill: parent
@ -130,7 +130,8 @@ Kirigami.Page {
EntryPage {
entry: podcastPlayerPage.entry
title: "📃"
icon.name: "help-about"
title: "Info"
}
}
actions.main: Kirigami.Action {