Merge pull request #6756 from spycrab/qt_segoe_ui

Qt/Win32: Force Segoe UI
This commit is contained in:
Léo Lam 2018-05-05 18:09:00 +02:00 committed by GitHub
commit 58b96eeb9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,17 @@ int main(int argc, char* argv[])
QApplication app(argc, argv);
#ifdef _WIN32
// Force the default font to Segoe UI on Windows
QFont font = QApplication::font();
font.setFamily(QStringLiteral("Segoe UI"));
// The default font size is a bit too small
font.setPointSize(QFontInfo(font).pointSize() * 1.2);
QApplication::setFont(font);
#endif
auto parser = CommandLineParse::CreateParser(CommandLineParse::ParserOptions::IncludeGUIOptions);
const optparse::Values& options = CommandLineParse::ParseArguments(parser.get(), argc, argv);
const std::vector<std::string> args = parser->args();