diff --git a/src/declarativeimports/core/private/DefaultToolTip.qml b/src/declarativeimports/core/private/DefaultToolTip.qml --- a/src/declarativeimports/core/private/DefaultToolTip.qml +++ b/src/declarativeimports/core/private/DefaultToolTip.qml @@ -66,23 +66,23 @@ } ColumnLayout { + Layout.maximumWidth: preferredTextWidth PlasmaExtras.Heading { id: tooltipMaintext level: 3 - property int _width: Math.min(implicitWidth, preferredTextWidth) - Layout.minimumWidth: _width - Layout.maximumWidth: preferredTextWidth + Layout.fillWidth: true elide: Text.ElideRight wrapMode: Text.Wrap text: toolTip ? toolTip.mainText : "" visible: text != "" } PlasmaComponents.Label { id: tooltipSubtext - property int _width: Math.min(implicitWidth, preferredTextWidth) - Layout.minimumWidth: _width - Layout.maximumWidth: preferredTextWidth + Layout.fillWidth: true + // Unset Label default height, confuses the layout engine completely + // either shifting the item vertically or letting it get too wide + height: undefined wrapMode: Text.WordWrap text: toolTip ? toolTip.subText : "" textFormat: toolTip ? toolTip.textFormat : Text.AutoText