fix(StatusBaseInput): adjust emoji size and position in base input (#660)
This commit is contained in:
parent
ef891ea02c
commit
524915a68a
|
@ -313,6 +313,7 @@ Item {
|
|||
root.editClicked()
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: root.leftPadding
|
||||
|
@ -478,8 +479,8 @@ Item {
|
|||
StatusSmartIdenticon {
|
||||
id: identicon
|
||||
|
||||
icon.width: !root.icon.emoji ? 20 : 30
|
||||
icon.height: !root.icon.emoji ? 20 : 30
|
||||
icon.width: !root.icon.emoji ? 20 : 24
|
||||
icon.height: !root.icon.emoji ? 20 : 24
|
||||
icon.background: root.icon.background
|
||||
icon.color: root.icon.color
|
||||
icon.letterSize: root.icon.letterSize
|
||||
|
|
|
@ -98,7 +98,7 @@ QtObject {
|
|||
return undefined
|
||||
}
|
||||
|
||||
function getRandomEmoji() {
|
||||
function getRandomEmoji(size) {
|
||||
var randomEmoji = EmojiJSON.emoji_json[Math.floor(Math.random() * EmojiJSON.emoji_json.length)]
|
||||
|
||||
const extenstionIndex = randomEmoji.unicode.lastIndexOf('.');
|
||||
|
@ -115,6 +115,7 @@ QtObject {
|
|||
})
|
||||
const encodedIcon = String.fromCodePoint(...codePointParts);
|
||||
|
||||
return Emoji.parse(encodedIcon) + ' '
|
||||
// Adding a space because otherwise, some emojis would fuse since emoji is just a string
|
||||
return Emoji.parse(encodedIcon, size || undefined) + ' '
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue