summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-06-11 23:08:15 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-06-11 23:08:15 +0200
commit150c9b1dbc4be490413fe1826c48e5d6d15146f0 (patch)
tree2fbafe00c55479f5bc8f0faa93e896ede389dcb3 /src
parentFix warning about not registered Presence type (diff)
downloadnheko-150c9b1dbc4be490413fe1826c48e5d6d15146f0.tar.xz
Fix scale factor setting
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp

index 04ff5155..46691e6f 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -107,6 +107,15 @@ main(int argc, char *argv[]) // needed for settings so need to register before any settings are read to prevent warings qRegisterMetaType<UserSettings::Presence>(); + QCoreApplication::setApplicationName("nheko"); + QCoreApplication::setApplicationVersion(nheko::version); + QCoreApplication::setOrganizationName("nheko"); + QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + + // this needs to be after setting the application name. Or how would we find our settings + // file then? #if defined(Q_OS_LINUX) || defined(Q_OS_WIN) || defined(Q_OS_FREEBSD) if (qgetenv("QT_SCALE_FACTOR").size() == 0) { float factor = utils::scaleFactor(); @@ -116,12 +125,6 @@ main(int argc, char *argv[]) } #endif - QCoreApplication::setApplicationName("nheko"); - QCoreApplication::setApplicationVersion(nheko::version); - QCoreApplication::setOrganizationName("nheko"); - QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); SingleApplication app(argc, argv, false,