Skip to content

Commit bbedfa9

Browse files
hfiguieretresf
authored andcommitted
Fix Linux HiDPI handling
Fix HiDPI order of operations, remove shortcut technique
1 parent 3c88541 commit bbedfa9

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

cmake/linux/lmms.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Comment=Music sequencer and synthesizer
88
Comment[ca]=Producció fàcil de música per a tothom!
99
Comment[fr]=Production facile de musique pour tout le monde !
1010
Icon=lmms
11-
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 QT_AUTO_SCREEN_SCALE_FACTOR=1 lmms %f
11+
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 lmms %f
1212
Terminal=false
1313
Type=Application
1414
Categories=Qt;AudioVideo;Audio;Midi;

src/core/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ int main( int argc, char * * argv )
252252
return EXIT_FAILURE;
253253
}
254254
#endif
255-
255+
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
256+
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
257+
#endif
256258
QCoreApplication * app = coreOnly ?
257259
new QCoreApplication( argc, argv ) :
258260
new MainApplication( argc, argv );

src/gui/GuiApplication.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ GuiApplication* GuiApplication::instance()
5454

5555
GuiApplication::GuiApplication()
5656
{
57-
// enable HiDPI scaling before showing anything (Qt 5.6+ only)
58-
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
59-
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
60-
#endif
61-
6257
// prompt the user to create the LMMS working directory (e.g. ~/Documents/lmms) if it doesn't exist
6358
if ( !ConfigManager::inst()->hasWorkingDir() &&
6459
QMessageBox::question( NULL,

0 commit comments

Comments
 (0)