Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not format text in QML components as HTML #4944

Merged
merged 1 commit into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/gui/BasicComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ComboBox {
rightPadding: clearComboBox.indicator.width + clearComboBox.spacing

text: clearComboBox.displayText
textFormat: Text.PlainText
color: Style.ncTextColor
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
Expand Down Expand Up @@ -87,6 +88,7 @@ ComboBox {
width: clearComboBox.width
contentItem: Label {
text: modelData.display
textFormat: Text.PlainText
color: Style.ncTextColor
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
Expand Down
1 change: 1 addition & 0 deletions src/gui/ErrorBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ Item {
color: errorBox.color
wrapMode: Text.WordWrap
text: errorBox.text
textFormat: Text.PlainText
}
}
2 changes: 2 additions & 0 deletions src/gui/PredefinedStatusButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ AbstractButton {
Label {
width: root.emojiWidth > 0 ? root.emojiWidth : implicitWidth
text: emoji
textFormat: Text.PlainText
horizontalAlignment: Image.AlignHCenter
verticalAlignment: Image.AlignVCenter
}

Label {
text: root.text
textFormat: Text.PlainText
color: Style.ncTextColor
verticalAlignment: Text.AlignVCenter
}
Expand Down
2 changes: 2 additions & 0 deletions src/gui/UserStatusSelectorButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ AbstractButton {
verticalAlignment: Text.AlignVCenter

text: root.text
textFormat: Text.PlainText
wrapMode: Text.Wrap
color: root.colored ? Style.ncHeaderTextColor : Style.ncTextColor
font.bold: root.primary
Expand All @@ -83,6 +84,7 @@ AbstractButton {
verticalAlignment: Text.AlignVCenter

text: root.secondaryText
textFormat: Text.PlainText
wrapMode: Text.Wrap
color: Style.ncSecondaryTextColor
visible: root.secondaryText !== ""
Expand Down
4 changes: 4 additions & 0 deletions src/gui/tray/ActivityItemContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ RowLayout {
wrapMode: Text.Wrap
maximumLineCount: 2
font.pixelSize: Style.topLinePixelSize
textFormat: Text.PlainText
color: Style.ncTextColor
visible: text !== ""
}
Expand All @@ -145,6 +146,7 @@ RowLayout {
wrapMode: Text.Wrap
maximumLineCount: 2
font.pixelSize: Style.subLinePixelSize
textFormat: Text.PlainText
color: Style.ncTextColor
visible: text !== ""
}
Expand All @@ -158,6 +160,7 @@ RowLayout {
wrapMode: Text.Wrap
maximumLineCount: 2
font.pixelSize: Style.subLinePixelSize
textFormat: Text.PlainText
color: Style.ncSecondaryTextColor
visible: text !== ""
}
Expand All @@ -171,6 +174,7 @@ RowLayout {
wrapMode: Text.Wrap
maximumLineCount: 2
font.pixelSize: Style.topLinePixelSize
textFormat: Text.PlainText
color: Style.ncSecondaryTextColor
visible: text !== ""
}
Expand Down
1 change: 1 addition & 0 deletions src/gui/tray/CallNotificationDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ Window {
Label {
id: message
text: root.subject
textFormat: Text.PlainText
color: root.usingUserAvatar ? "white" : Style.ncTextColor
font.pixelSize: Style.topLinePixelSize
wrapMode: Text.WordWrap
Expand Down
1 change: 1 addition & 0 deletions src/gui/tray/CustomButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Button {
Layout.fillWidth: icon.status !== Image.Ready

text: root.text
textFormat: Text.PlainText
font.bold: root.bold

visible: root.text !== ""
Expand Down
1 change: 1 addition & 0 deletions src/gui/tray/CustomTextButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Label {
Accessible.onPressAction: root.clicked(null)

text: action ? action.text : ""
textFormat: Text.PlainText
enabled: !action || action.enabled
onClicked: if (action) action.trigger()

Expand Down
1 change: 1 addition & 0 deletions src/gui/tray/NCToolTip.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ToolTip {
delay: Qt.styleHints.mousePressAndHoldInterval
contentItem: Label {
text: toolTip.text
textFormat: Text.PlainText
color: Style.ncTextColor
wrapMode: Text.Wrap
}
Expand Down