Only show formatted description in detail page

We can't show rich text in the package list, because the we use the onLineLaidOut signal there, which doesn't work with Rich Text. So for the package list we should NOT use the formatted version of the description because that will contain ugly HTML tags that the user wouldn't want to see. Show the original description there. Use the formatted description only in the detail page where we don't use onLineLaidOut.

Contributes to issue CURA-8565.
This commit is contained in:
Ghostkeeper 2021-11-29 19:35:57 +01:00
parent b5c7dfe9a2
commit d96284ee3e
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
2 changed files with 9 additions and 3 deletions

View file

@ -233,6 +233,7 @@ Rectangle
property real lastLineWidth: 0; //Store the width of the last line, to properly position the elision.
text: packageData.description
textFormat: Text.PlainText //Must be plain text, or we won't get onLineLaidOut signals. Don't auto-detect!
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
maximumLineCount: 2
@ -401,7 +402,7 @@ Rectangle
{
width: parent.width - parent.padding * 2
text: packageData.description
text: packageData.formattedDescription
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
linkColor: UM.Theme.getColor("text_link")