mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-12 16:13:13 +02:00
properly using default application font if none is specified in our settings instead of hard coding times 11
This commit is contained in:
@@ -193,13 +193,17 @@ void FWBSettings::init()
|
|||||||
if (!ok) setIconsInRulesSize(SIZE25X25);
|
if (!ok) setIconsInRulesSize(SIZE25X25);
|
||||||
|
|
||||||
ok = contains(rulesFont);
|
ok = contains(rulesFont);
|
||||||
if (!ok) setRulesFont(QFont("times", 11, QFont::Normal));
|
if (!ok) setRulesFont(QApplication::font());
|
||||||
|
|
||||||
ok = contains(treeFont);
|
ok = contains(treeFont);
|
||||||
if (!ok) setTreeFont(QFont("times", 11, QFont::Normal));
|
if (!ok) setTreeFont(QApplication::font());
|
||||||
|
|
||||||
ok = contains(uiFont);
|
ok = contains(uiFont);
|
||||||
if (!ok) setUiFont(QFont("times", 11, QFont::Normal));
|
if (!ok) setUiFont(QApplication::font());
|
||||||
|
|
||||||
|
if (fwbdebug)
|
||||||
|
qDebug("Default application font: %s",
|
||||||
|
QApplication::font().toString().toLatin1().constData());
|
||||||
|
|
||||||
ok = contains(clipComment);
|
ok = contains(clipComment);
|
||||||
if (!ok) setClipComment(true);
|
if (!ok) setClipComment(true);
|
||||||
@@ -625,7 +629,7 @@ QFont FWBSettings::getFontByType(const char *type)
|
|||||||
bool ok = font.fromString(value(type).toString());
|
bool ok = font.fromString(value(type).toString());
|
||||||
if (ok)
|
if (ok)
|
||||||
return font;
|
return font;
|
||||||
return QFont("times", 11, QFont::Normal);
|
return QApplication::font();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FWBSettings::getClipComment()
|
bool FWBSettings::getClipComment()
|
||||||
|
|||||||
Reference in New Issue
Block a user