Commit 939e9eb3 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

emojier: use proper scoping for QPixmap

parent 56fd9833
......@@ -68,13 +68,12 @@ public:
QPixmap requestPixmap(const QString &id, QSize *_size, const QSize &requestedSize) override
{
QPixmap dummy;
const QString renderString = id.mid(1); //drop initial /
QSize size = requestedSize;
QFont font;
if (!size.isValid()) {
QPixmap dummy;
QFontMetrics fm(font, &dummy);
size = { fm.horizontalAdvance(renderString), fm.height() };
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment