mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
Made sure that the qt version check is in place
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -765,7 +765,12 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftT
|
||||
for (auto w : QApplication::topLevelWidgets()) {
|
||||
auto mainWindow = qobject_cast<QMainWindow*>(w);
|
||||
if (mainWindow) {
|
||||
screenGeometry = screenGeometry.shrunkBy(mainWindow->windowHandle()->frameMargins());
|
||||
auto m = mainWindow->windowHandle()->frameMargins();
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
screenGeometry = screenGeometry.shrunkBy(m);
|
||||
#else
|
||||
screenGeometry = { screenGeometry.width() - m.left() - m.right(), screenGeometry.height() - m.top() - m.bottom() };
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user