Correct height of tips text

The contentHeight property seems to indicate the height of only one line, contrary to the documentation...

Contributes to issue CURA-4148.
This commit is contained in:
Ghostkeeper 2017-08-31 10:18:54 +02:00
parent 526a42f7a0
commit c4910503e4
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -488,14 +488,16 @@ Item
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
anchors.left: parent.left
width: parent.width
height: childrenRect.height
height: tipsText.contentHeight * tipsText.lineCount
Text
{
id: tipsText
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
anchors.top: parent.top
wrapMode: Text.WordWrap
//: Tips label
text: catalog.i18nc("@label", "Need help improving your prints?<br>Read the <a href='%1'>Ultimaker Troubleshooting Guides</a>").arg("https://ultimaker.com/en/troubleshooting") + "<img src='%1'></img>".arg(UM.Theme.getIcon("play"))