Commit 62af766f authored by Noah Davis's avatar Noah Davis 🌵 Committed by Nate Graham
Browse files

applets/kickoff: fix grid delegate tooltips not appearing on hover


(cherry picked from commit 8d991803)
parent 399c1288
Pipeline #198055 passed with stage
in 5 minutes and 29 seconds
......@@ -169,9 +169,9 @@ T.ItemDelegate {
leftMargin: root.textUnderIcon ? 0 : root.implicitContentWidth + root.spacing
baselineOffset: root.textUnderIcon ? implicitHeight : 0
}
visible: !textUnderIcon && text.length > 0 && text !== root.text && label.lineCount === 1
visible: !textUnderIcon && text.length > 0
enabled: false
text: root.description
text: root.Accessible.description
elide: Text.ElideRight
horizontalAlignment: root.textUnderIcon ? Text.AlignHCenter : Text.AlignRight
verticalAlignment: root.textUnderIcon ? Text.AlignTop : Text.AlignVCenter
......@@ -248,14 +248,15 @@ T.ItemDelegate {
}
PC3.ToolTip.text: {
if (label.truncated && descriptionLabel.truncated) {
const showDescription = descriptionLabel.truncated
|| (textUnderIcon && Accessible.description.length > 0)
if (label.truncated && showDescription) {
return `${text} (${description})`
} else if (descriptionLabel.truncated) {
} else if (showDescription) {
return description
} else {
return text
}
return ""
}
PC3.ToolTip.visible: mouseArea.containsMouse && ((label.visible && label.truncated) || (descriptionLabel.visible && descriptionLabel.truncated))
PC3.ToolTip.visible: mouseArea.containsMouse && PC3.ToolTip.text.length > 0
PC3.ToolTip.delay: Kirigami.Units.toolTipDelay
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment