Limit feed description to two lines until the "show more" button is pressed

BUG: 461216
This commit is contained in:
Bart De Vries 2023-01-17 14:08:33 +01:00
parent 285d3e2c62
commit 50e88a11c2
1 changed files with 3 additions and 1 deletions

View File

@ -188,7 +188,9 @@ Kirigami.ScrollablePage {
Controls.Label { Controls.Label {
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
textFormat: TextEdit.RichText textFormat: page.showMoreInfo ? TextEdit.RichText : Text.StyledText
maximumLineCount: page.showMoreInfo ? undefined : 2
elide: Text.ElideRight
text: feed.description text: feed.description
font.pointSize: Kirigami.Theme.defaultFont.pointSize font.pointSize: Kirigami.Theme.defaultFont.pointSize
wrapMode: Text.WordWrap wrapMode: Text.WordWrap