fix tooltip's horizontal sizing

This is Martin Klapetek's version of the fix, it also works nicely on my
machine, and seems otherwise logical.

CCMAIL:mklapetek@kde.org
REVIEW:122717
This commit is contained in:
Sebastian Kügler 2015-03-05 23:30:24 +01:00
parent 9a41afb29b
commit a2dd646a17

View File

@ -69,7 +69,7 @@ Item {
level: 3
property int _width: Math.min(implicitWidth, preferredTextWidth)
Layout.minimumWidth: _width
Layout.maximumWidth: _width
Layout.maximumWidth: preferredTextWidth
elide: Text.ElideRight
text: toolTip ? toolTip.mainText : ""
visible: text != ""
@ -78,7 +78,7 @@ Item {
id: tooltipSubtext
property int _width: Math.min(implicitWidth, preferredTextWidth)
Layout.minimumWidth: _width
Layout.maximumWidth: _width
Layout.maximumWidth: preferredTextWidth
wrapMode: Text.WordWrap
text: toolTip ? toolTip.subText : ""
textFormat: toolTip ? toolTip.textFormat : Text.AutoText