feat: Tooltip supports rich text parsing

This commit is contained in:
loner
2025-11-19 05:10:26 +08:00
parent 063ca70c57
commit 4b507fa238
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -414,7 +414,8 @@ PopupWindow {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
width: root.maxWidth - (root.padding * 2)
width: Math.min(implicitWidth, root.maxWidth - (root.padding * 2))
richTextEnabled: true
}
}
}
+4
View File
@@ -17,6 +17,8 @@ Text {
return fontScale;
}
property bool richTextEnabled: false
font.family: root.family
font.weight: Style.fontWeightMedium
font.pointSize: root.pointSize * fontScale
@@ -24,4 +26,6 @@ Text {
elide: Text.ElideRight
wrapMode: Text.NoWrap
verticalAlignment: Text.AlignVCenter
textFormat: richTextEnabled ? Text.RichText : Text.PlainText
}