mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 04:00:44 +00:00
Add diagnostics when setting application font
To help resolve font setting problem on RPi4
This commit is contained in:
parent
ae0f498d0c
commit
b00434f1d9
@ -349,6 +349,8 @@ void validateFont (QString which, int size, bool bold, bool italic) {
|
|||||||
if (testFont.length() > 0 && installedFontFamilies.indexOf(testFont) >= 0) {
|
if (testFont.length() > 0 && installedFontFamilies.indexOf(testFont) >= 0) {
|
||||||
desiredFont = testFont;
|
desiredFont = testFont;
|
||||||
forceFont = false;
|
forceFont = false;
|
||||||
|
} else {
|
||||||
|
qDebug() << testFont << size << "not found, substituting" << desiredFont << size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,6 +378,7 @@ void setApplicationFont () {
|
|||||||
font.setItalic(((*p_pref)["Fonts_Application_Italic"]).toBool());
|
font.setItalic(((*p_pref)["Fonts_Application_Italic"]).toBool());
|
||||||
QApplication::setFont(font);
|
QApplication::setFont(font);
|
||||||
mainwin->menuBar()->setFont(font);
|
mainwin->menuBar()->setFont(font);
|
||||||
|
qDebug() << "Application font set to" << font << "system now says" << QFontDatabase::systemFont(QFontDatabase::GeneralFont).family();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool removeDir(const QString &path)
|
bool removeDir(const QString &path)
|
||||||
|
Loading…
Reference in New Issue
Block a user