1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Force smiley size to match text size

Fixes #501
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-10-23 22:39:03 +02:00
parent fa44956010
commit 80e648a5a2
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -19,6 +19,8 @@
#include <QFileInfo>
#include <QFile>
#include <QFont>
#include <QFontInfo>
#include <QIcon>
#include <QPixmap>
#include <QDir>
@ -178,7 +180,7 @@ QList<QStringList> SmileyPack::getEmoticons() const
QString SmileyPack::getAsRichText(const QString &key)
{
return "<img src=\"data:image/png;base64," % QString(getCachedSmiley(key).toBase64()) % "\">";
return "<img height=\""%QString().setNum(QFontInfo(QFont()).pixelSize())%"\" src=\"data:image/png;base64," % QString(getCachedSmiley(key).toBase64()) % "\">";
}
QIcon SmileyPack::getAsIcon(const QString &key)