diff --git a/cmake/linux/lmms.desktop b/cmake/linux/lmms.desktop index 46fb26c0d84..6962ad40353 100644 --- a/cmake/linux/lmms.desktop +++ b/cmake/linux/lmms.desktop @@ -10,7 +10,7 @@ Comment[ca]=Producció fàcil de música per a tothom! Comment[fr]=Production facile de musique pour tout le monde ! Comment[pl]=Prosta produkcja muzyki dla każdego! Icon=lmms -Exec=env QT_X11_NO_NATIVE_MENUBAR=1 lmms %f +Exec=env QT_X11_NO_NATIVE_MENUBAR=1 QT_AUTO_SCREEN_SCALE_FACTOR=1 lmms %f Terminal=false Type=Application Categories=Qt;AudioVideo;Audio;Midi; diff --git a/src/gui/GuiApplication.cpp b/src/gui/GuiApplication.cpp index 448dd740e2d..c98170401f9 100644 --- a/src/gui/GuiApplication.cpp +++ b/src/gui/GuiApplication.cpp @@ -40,6 +40,7 @@ #include "SongEditor.h" #include +#include #include #include #include @@ -54,6 +55,11 @@ GuiApplication* GuiApplication::instance() GuiApplication::GuiApplication() { + // enable HiDPI scaling before showing anything (Qt 5.6+ only) + #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); + #endif + // prompt the user to create the LMMS working directory (e.g. ~/lmms) if it doesn't exist if ( !ConfigManager::inst()->hasWorkingDir() && QMessageBox::question( NULL,