From: Hannah von Reth Date: Tue, 5 Nov 2019 16:02:01 +0000 (+0100) Subject: [Gui] Set proper hdpi attributes X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~160 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9807285abdc6599f2ec31a638d178231dd61653e;p=nextcloud-desktop.git [Gui] Set proper hdpi attributes --- diff --git a/src/gui/main.cpp b/src/gui/main.cpp index e668da62b..c2478107d 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -62,16 +62,9 @@ int main(int argc, char **argv) // OpenSSL 1.1.0: No explicit initialisation or de-initialisation is necessary. + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); #ifdef Q_OS_WIN -// If the font size ratio is set on Windows, we need to -// enable the auto pixelRatio in Qt since we don't -// want to use sizes relative to the font size everywhere. -// This is automatic on OS X, but opt-in on Windows and Linux -// https://doc-snapshots.qt.io/qt5-5.6/highdpi.html#qt-support -// We do not define it on linux so the behaviour is kept the same -// as other Qt apps in the desktop environment. (which may or may -// not set this envoronment variable) - qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); #endif // !Q_OS_WIN #ifdef Q_OS_MAC