feat(StatusIconSetting): add emojiSize setting for icons (#579)
This commit is contained in:
parent
dfad051880
commit
66b5b9d34b
|
@ -28,8 +28,9 @@ Rectangle {
|
|||
width: 24
|
||||
height: 24
|
||||
color: Theme.palette.miscColor5
|
||||
letterSize: emoji ? 14 : 15
|
||||
letterSize: emoji ? 10 : 15
|
||||
emoji: ""
|
||||
emojiSize: Emoji.size.verySmall
|
||||
charactersLen: 1
|
||||
}
|
||||
property int type: StatusChatListItem.Type.PublicChat
|
||||
|
|
|
@ -9,6 +9,7 @@ Rectangle {
|
|||
property alias identiconText: identiconText
|
||||
property string name
|
||||
property string emoji
|
||||
property string emojiSize
|
||||
property int letterSize: 21
|
||||
property int charactersLen: 1
|
||||
|
||||
|
@ -35,7 +36,7 @@ Rectangle {
|
|||
if(Utils.isHtml(emoji))
|
||||
return emoji
|
||||
else
|
||||
return Emoji.parse(emoji)
|
||||
return Emoji.parse(emoji, emojiSize || undefined)
|
||||
}
|
||||
|
||||
const shift = (root.name.charAt(0) === "#") ||
|
||||
|
|
|
@ -57,6 +57,8 @@ Control {
|
|||
visible: root.icon.isLetterIdenticon
|
||||
color: root.icon.color
|
||||
name: root.primaryText
|
||||
emoji: root.icon.emoji
|
||||
emojiSize: root.icon.emojiSize
|
||||
}
|
||||
StatusBaseText {
|
||||
font.weight: Font.Medium
|
||||
|
|
|
@ -85,6 +85,7 @@ Loader {
|
|||
color: statusSmartIdenticon.icon.color
|
||||
name: statusSmartIdenticon.name
|
||||
emoji: statusSmartIdenticon.icon.emoji
|
||||
emojiSize: statusSmartIdenticon.icon.emojiSize
|
||||
letterSize: statusSmartIdenticon.icon.letterSize
|
||||
identiconText.color: statusSmartIdenticon.icon.textColor
|
||||
charactersLen: statusSmartIdenticon.icon.charactersLen
|
||||
|
|
|
@ -16,5 +16,6 @@ QtObject {
|
|||
property int letterSize
|
||||
property int charactersLen
|
||||
property string emoji
|
||||
property string emojiSize
|
||||
property StatusIconBackgroundSettings background: StatusIconBackgroundSettings {}
|
||||
}
|
||||
|
|
|
@ -8,9 +8,11 @@ import "./emojiList.js" as EmojiJSON
|
|||
|
||||
QtObject {
|
||||
readonly property var size: {
|
||||
"veryBig": "86x86",
|
||||
"big": "72x72",
|
||||
"middle": "32x32",
|
||||
"small": "18x18"
|
||||
"small": "18x18",
|
||||
"verySmall": "16x16"
|
||||
}
|
||||
property string base: Qt.resolvedUrl("../../../assets/twemoji/")
|
||||
function parse(text, renderSize = size.small) {
|
||||
|
|
Loading…
Reference in New Issue