From 50e88a11c2cec965d5d7cbaba4f6db44f9b0e7b9 Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Tue, 17 Jan 2023 14:08:33 +0100 Subject: [PATCH] Limit feed description to two lines until the "show more" button is pressed BUG: 461216 --- src/qml/FeedDetailsPage.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qml/FeedDetailsPage.qml b/src/qml/FeedDetailsPage.qml index f4047241..b2c9127b 100644 --- a/src/qml/FeedDetailsPage.qml +++ b/src/qml/FeedDetailsPage.qml @@ -188,7 +188,9 @@ Kirigami.ScrollablePage { Controls.Label { Layout.fillWidth: true 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 font.pointSize: Kirigami.Theme.defaultFont.pointSize wrapMode: Text.WordWrap