From ef27e4e4e5a8de9a267d2dc896cbd878ffb7982d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Aug 2018 14:18:33 +0200 Subject: Default to fontSize 11 --- applications/kube/main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/applications/kube/main.cpp b/applications/kube/main.cpp index 61773381..49a0b5fa 100644 --- a/applications/kube/main.cpp +++ b/applications/kube/main.cpp @@ -120,9 +120,15 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); app.setApplicationName("kube"); app.setApplicationVersion(QString("%1 Branch: %2 Commit: %3").arg(kube_VERSION_STRING).arg(kube_BRANCH).arg(kube_COMMIT)); - app.setFont(QFont{"Noto Sans", app.font().pointSize(), QFont::Normal}); - - qDebug() << "Font size:" << app.font().pointSize(); + auto fontSize = app.font().pointSize(); +#ifdef Q_OS_UNIX + if (qgetenv("QT_QPA_PLATFORMTHEME").isEmpty()) { + //The hardcoded default in qgenericunixthemes.cpp of 9 is tiny, so we default to something larger. + fontSize = 11; + } +#endif + qWarning() << "Font size:" << fontSize; + app.setFont(QFont{"Noto Sans", fontSize, QFont::Normal}); QCommandLineParser parser; parser.setApplicationDescription("A communication and collaboration client."); -- cgit v1.2.3