mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-19 04:02:09 +01:00
Do not resize the font on every usage
This commit is contained in:
parent
ebb690673c
commit
561fadb4f2
@ -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; \
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user