fix(profile): workaround to increase emoji sharpness in Profile
Add "supersampling" option to the ProfileHeader. Enabilng the option will draw the emojis at double the resolution and downasmple them by scaling down the text control by half to compensate for the resolution increase fixes: #5109
This commit is contained in:
parent
3ef69f6ba7
commit
5147c6febb
|
@ -85,7 +85,8 @@ ColumnLayout {
|
|||
|
||||
imageWidth: 80
|
||||
imageHeight: 80
|
||||
emojiSize: "20x20"
|
||||
emojiSize: Qt.size(20,20)
|
||||
supersampling: true
|
||||
|
||||
imageOverlay: Item {
|
||||
StatusFlatRoundButton {
|
||||
|
|
|
@ -20,7 +20,8 @@ Item {
|
|||
|
||||
property alias imageWidth: userImage.imageWidth
|
||||
property alias imageHeight: userImage.imageHeight
|
||||
property alias emojiSize: emojihash.size
|
||||
property size emojiSize: Qt.size(14, 14)
|
||||
property bool supersampling: true
|
||||
|
||||
property alias imageOverlay: imageOverlay.sourceComponent
|
||||
|
||||
|
@ -90,10 +91,12 @@ Item {
|
|||
Text {
|
||||
id: emojihash
|
||||
|
||||
property string size: "14x14"
|
||||
readonly property size finalSize: supersampling ? Qt.size(emojiSize.width * 2, emojiSize.height * 2) : emojiSize
|
||||
property string size: `${finalSize.width}x${finalSize.height}`
|
||||
|
||||
Layout.fillWidth: true
|
||||
renderType: Text.NativeRendering
|
||||
scale: supersampling ? 0.5 : 1
|
||||
|
||||
text: {
|
||||
const emojiHash = Utils.getEmojiHashAsJson(root.pubkey)
|
||||
|
|
|
@ -122,8 +122,9 @@ StatusModal {
|
|||
|
||||
displayNameVisible: false
|
||||
pubkeyVisible: false
|
||||
supersampling: true
|
||||
emojiSize: Qt.size(20,20)
|
||||
|
||||
emojiSize: "20x20"
|
||||
imageWidth: 80
|
||||
imageHeight: 80
|
||||
|
||||
|
|
Loading…
Reference in New Issue