Skip to content

Commit

Permalink
Fix Linux HiDPI handling
Browse files Browse the repository at this point in the history
Fix HiDPI order of operations, remove shortcut technique
  • Loading branch information
hfiguiere authored and tresf committed Feb 9, 2019
1 parent 3c88541 commit bbedfa9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/linux/lmms.desktop
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/core/main.cpp
Expand Up @@ -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 );
Expand Down
5 changes: 0 additions & 5 deletions src/gui/GuiApplication.cpp
Expand Up @@ -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,
Expand Down

0 comments on commit bbedfa9

Please sign in to comment.