Use Segoe UI font on Windows.

Qt uses "MS Shell Dlg 2" as the default font, which resolves to
Tahoma and not Segoe UI, which is the actual Windows 10 default font.

See QTBUG-58610
This commit is contained in:
Janek Bevendorff 2020-05-21 02:58:52 +02:00
parent a1b4a3f8b7
commit bcb64a231f

View File

@ -73,7 +73,6 @@ namespace Bootstrap
setupSearchPaths(); setupSearchPaths();
applyEarlyQNetworkAccessManagerWorkaround(); applyEarlyQNetworkAccessManagerWorkaround();
Translator::installTranslators();
} }
/** /**
@ -84,6 +83,15 @@ namespace Bootstrap
void bootstrapApplication() void bootstrapApplication()
{ {
bootstrap(); bootstrap();
Translator::installTranslators();
#ifdef Q_OS_WIN
// Qt on Windows uses "MS Shell Dlg 2" as the default font for many widgets, which resolves
// to Tahoma 8pt, whereas the correct font would be "Segoe UI" 9pt.
// Apparently, some widgets are already using the correct font. Thanks, MuseScore for this neat fix!
QApplication::setFont(QApplication::font("QMessageBox"));
#endif
MessageBox::initializeButtonDefs(); MessageBox::initializeButtonDefs();
#ifdef Q_OS_MACOS #ifdef Q_OS_MACOS