fix(StatusEmojiSuggestionPopup): emoji is blurry in the suggestions popup

use an SVG icon instead of a potentially lowres PNG

Fixes #8409
This commit is contained in:
Lukáš Tinkl 2022-11-23 17:17:23 +01:00 committed by Lukáš Tinkl
parent 92da7ee9a3
commit c1fd4cc680
2 changed files with 7 additions and 6 deletions

View File

@ -48,6 +48,9 @@ QtObject {
const match = parsed.match('src="(.*\.svg).*"');
return (match && match.length >= 2) ? match[1] : undefined;
}
function svgImage(unicode) {
return `${base}/svg/${unicode}.svg`
}
function iconId(text) {
const parsed = parse(text);
const match = parsed.match('src=".*\/(.+?).svg');

View File

@ -1,11 +1,9 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.12
import QtQuick.Dialogs 1.3
import QtQuick 2.14
import utils 1.0
import shared 1.0
import StatusQ.Core.Utils 0.1
StatusInputListPopup {
id: emojiSuggestions
@ -19,7 +17,7 @@ StatusInputListPopup {
}
getImageSource: function (modelData) {
return `qrc:/StatusQ/src/assets/twemoji/72x72/${modelData.unicode}.png`
return Emoji.svgImage(modelData.unicode)
}
getText: function (modelData) {
return modelData.shortname