Skip to content

Commit

Permalink
Automatic scaling only if no relevant env vars set
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSchneid3r committed Nov 23, 2017
1 parent 647a964 commit 6358456
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/albertcore/src/core/albert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ int Core::AlbertApp::run(int argc, char **argv) {

qDebug() << "Initializing application";
#if QT_VERSION >= 0x050600 // TODO: Remove when 18.04 is released
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")
&& !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
&& !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")
&& !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS"))
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
app = new QApplication(argc, argv);
Expand Down

0 comments on commit 6358456

Please sign in to comment.