mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
NText: RichText or StyledText (no plainText)
This commit is contained in:
+2
-3
@@ -6,6 +6,7 @@ import qs.Widgets
|
||||
Text {
|
||||
id: root
|
||||
|
||||
property bool richTextEnabled: false
|
||||
property string family: Settings.data.ui.fontDefault
|
||||
property real pointSize: Style.fontSizeM
|
||||
property bool applyUiScale: true
|
||||
@@ -17,8 +18,6 @@ Text {
|
||||
return fontScale;
|
||||
}
|
||||
|
||||
property bool richTextEnabled: false
|
||||
|
||||
font.family: root.family
|
||||
font.weight: Style.fontWeightMedium
|
||||
font.pointSize: root.pointSize * fontScale
|
||||
@@ -27,5 +26,5 @@ Text {
|
||||
wrapMode: Text.NoWrap
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
textFormat: richTextEnabled ? Text.RichText : Text.PlainText
|
||||
textFormat: richTextEnabled ? Text.RichText : Text.StyledText
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user