mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat: Tooltip supports rich text parsing
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user