1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Do not resize the font on every usage

This commit is contained in:
Martin Tůma 2019-06-29 10:27:12 +02:00
parent ebb690673c
commit 561fadb4f2

View File

@ -102,13 +102,19 @@ static int minPOIZoom(Style::POIClass cl)
}
}
static QFont font(int pixelSize)
{
QFont f;
f.setPixelSize(pixelSize);
return f;
}
/* The fonts must be initialized on first usage (after the QGuiApplication
instance is created) */
#define FONT(name, size) \
static const QFont *name() \
{ \
static QFont f; \
f.setPixelSize(size); \
static QFont f = font(size); \
return &f; \
}