collapse tooltips that only have text
if a tooltip has only text, expecially only title or only subtitle, make it as small as possible BUG:343390 Change-Id: I5eff081613c9c64c78b8c5741bac67409a112c98
This commit is contained in:
parent
8044e15a71
commit
993cdb54a6
@ -32,7 +32,7 @@ Row {
|
||||
property Item toolTip
|
||||
|
||||
property int preferredTextWidth: theme.mSize(theme.defaultFont).width * 40
|
||||
property int _s: units.largeSpacing / 2
|
||||
property int _s: imageContainer.visible || (toolTip.mainText != "" && toolTip.subText != "") ? units.largeSpacing / 2 : 0
|
||||
|
||||
Layout.minimumWidth: implicitWidth + _s
|
||||
Layout.minimumHeight: implicitHeight + _s * 2
|
||||
@ -45,7 +45,7 @@ Row {
|
||||
|
||||
Item {
|
||||
id: imageContainer
|
||||
visible: toolTip != null && (toolTip.image != null || toolTip.icon != null)
|
||||
visible: toolTip != null && (toolTip.image != "" || toolTip.icon != "")
|
||||
width: Math.max(tooltipImage.width, tooltipIcon.width)
|
||||
height: Math.max(tooltipImage.height, tooltipIcon.height)
|
||||
x: _s
|
||||
|
Loading…
Reference in New Issue
Block a user