Qabel / qabel-desktop

(B2C) :computer: Desktop frontend of Qabel
Other
11 stars 12 forks source link

#531 emoji image renderer #557

Closed julianseeger closed 8 years ago

julianseeger commented 8 years ago

image

As the source images for the emojis are 48px per dimension, they are now shown as 24px in the chat to let every pixel look good enough. For other sizes to look good we would have to get svg images or resize the source files. I adjusted the font size to fit to that (it was too small anyways).

xxx :D xxx is rendered as `TextFlow(Text("xxx"), Label(ImageView(...)), Text("xxx")). Without the label, the TextFlow would ignore all positioning of the image and align it to the text baseline (which would render too high). Inside the label, we can show the image centered in all dimensions.

select emoji image -> :alias: is inserted to input -> :alias: is converted to unicode before being sent -> unicode emoji is replaced by image in the chat message view