Made sure that the qt version check is in place
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
1be29076ea
commit
81c5866fa9
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue