From 11d6bed8259e94d3e0813ab6465408dc1155101d Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 4 Apr 2025 15:04:25 +0200 Subject: [PATCH] Fix emoji font mixing in reactions --- resources/qml/Completer.qml | 2 +- resources/qml/MessageView.qml | 2 +- resources/qml/Reactions.qml | 4 ++-- resources/qml/device-verification/EmojiVerification.qml | 2 +- resources/qml/emoji/StickerPicker.qml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/qml/Completer.qml b/resources/qml/Completer.qml index ea67f3c1..e4786927 100644 --- a/resources/qml/Completer.qml +++ b/resources/qml/Completer.qml @@ -182,7 +182,7 @@ Control { Label { color: model.index == popup.currentIndex ? palette.highlightedText : palette.text - font: Settings.emojiFont + font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined text: model.unicode visible: !!model.unicode } diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index a5d2fd9f..6840d336 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -206,7 +206,7 @@ Item { anchors.centerIn: parent color: button.hovered ? button.highlightColor : button.buttonTextColor - font.family: Settings.emojiFont + font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined horizontalAlignment: Text.AlignHCenter padding: 0 text: button.modelData diff --git a/resources/qml/Reactions.qml b/resources/qml/Reactions.qml index 389b6705..93b3ed21 100644 --- a/resources/qml/Reactions.qml +++ b/resources/qml/Reactions.qml @@ -49,7 +49,7 @@ Flow { elide: Text.ElideRight elideWidth: 150 - font.family: Settings.emojiFont + font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined text: modelData.displayKey } Text { @@ -57,7 +57,7 @@ Flow { anchors.baseline: reactionCounter.baseline color: (reaction.hovered || modelData.selfReactedEvent !== '') ? palette.highlightedText : palette.text - font.family: Settings.emojiFont + font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined textFormat: TextEdit.RichText maximumLineCount: 1 text: { diff --git a/resources/qml/device-verification/EmojiVerification.qml b/resources/qml/device-verification/EmojiVerification.qml index a8abd740..1faf4dc3 100644 --- a/resources/qml/device-verification/EmojiVerification.qml +++ b/resources/qml/device-verification/EmojiVerification.qml @@ -372,7 +372,7 @@ ColumnLayout { Layout.alignment: Qt.AlignHCenter text: col.emoji.emoji font.pixelSize: Qt.application.font.pixelSize * 2 - font.family: Settings.emojiFont + font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined color: palette.text } diff --git a/resources/qml/emoji/StickerPicker.qml b/resources/qml/emoji/StickerPicker.qml index 675bf335..86eca4f5 100644 --- a/resources/qml/emoji/StickerPicker.qml +++ b/resources/qml/emoji/StickerPicker.qml @@ -183,7 +183,7 @@ Menu { height: stickerDim horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - font.family: Settings.emojiFont + font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined font.pixelSize: 36 text: del.modelData.unicode.replace('\ufe0f', '') }