Skip to content
Permalink
Browse files

Fix Linux HiDPI handling

Fix HiDPI order of operations, remove shortcut technique
  • Loading branch information...
hfiguiere authored and tresf committed Feb 9, 2019
1 parent 3c88541 commit bbedfa9ec5c6643c9ef9ffb36d08518e5f5f3d12
Showing with 4 additions and 7 deletions.
  1. +1 −1 cmake/linux/lmms.desktop
  2. +3 −1 src/core/main.cpp
  3. +0 −5 src/gui/GuiApplication.cpp
@@ -8,7 +8,7 @@ Comment=Music sequencer and synthesizer
Comment[ca]=Producció fàcil de música per a tothom!
Comment[fr]=Production facile de musique pour tout le monde !
Icon=lmms
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 QT_AUTO_SCREEN_SCALE_FACTOR=1 lmms %f
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 lmms %f
Terminal=false
Type=Application
Categories=Qt;AudioVideo;Audio;Midi;
@@ -252,7 +252,9 @@ int main( int argc, char * * argv )
return EXIT_FAILURE;
}
#endif

#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QCoreApplication * app = coreOnly ?
new QCoreApplication( argc, argv ) :
new MainApplication( argc, argv );
@@ -54,11 +54,6 @@ 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. ~/Documents/lmms) if it doesn't exist
if ( !ConfigManager::inst()->hasWorkingDir() &&
QMessageBox::question( NULL,

0 comments on commit bbedfa9

Please sign in to comment.
You can’t perform that action at this time.