Commit e8804d60 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/main): fix font size on mac os

parent 2a77b298
......@@ -206,9 +206,9 @@ void App::parseArgs () {
mParser.addVersionOption();
mParser.addOptions({
{ "config", tr("commandLineOptionConfig"), tr("commandLineOptionConfigArg") },
#ifndef __APPLE__
#ifndef Q_OS_MACOS
{ "iconified", tr("commandLineOptionIconified") },
#endif // ifndef __APPLE__
#endif // ifndef Q_OS_MACOS
{ "self-test", tr("commandLineOptionSelfTest") },
{ { "V", "verbose" }, tr("commandLineOptionVerbose") },
{ { "c", "cmd" }, tr("commandLineOptionCmd"), tr("commandLineOptionCmdArg") }
......
......@@ -22,6 +22,7 @@
#include <QDirIterator>
#include <QFontDatabase>
#include <QScreen>
#include "app/App.hpp"
......@@ -40,11 +41,11 @@ int main (int argc, char *argv[]) {
// ---------------------------------------------------------------------------
// Options to get a nice video render.
#ifdef _WIN32
#ifdef Q_OS_WIN
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES, true);
#else
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL, true);
#endif // ifdef _WIN32
#endif // ifdef Q_OS_WIN
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
{
......@@ -92,8 +93,16 @@ int main (int argc, char *argv[]) {
}
}
app.setFont(QFont(DEFAULT_FONT));
qInfo() << QStringLiteral("Main font:") << app.font();
{
QFont font(DEFAULT_FONT);
#ifdef Q_OS_MACOS
// 72 dpi on MacOs...
font.setPointSizeF(font.pointSize() * 96.0 / 72.0);
#endif // ifdef Q_OS_MACOS
app.setFont(QFont(DEFAULT_FONT));
}
// ---------------------------------------------------------------------------
// Init and run!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment