Skip to content

Commit 1406df6

Browse files
authored
Merge pull request #760 from nuttyartist/fix-macos-titlebar-safe-area-margins
Fix: macOS titlebar safe area margins for Qt 6.9.0+
2 parents 43fe159 + af2258b commit 1406df6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mainwindow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ void MainWindow::setupMainWindow()
357357
flags = Qt::Window; // cppcheck-suppress redundantInitialization // false positive
358358
# endif
359359
setWindowFlags(flags);
360+
#else
361+
# if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
362+
setAttribute(Qt::WA_ContentsMarginsRespectsSafeArea, false);
363+
# endif
360364
#endif
361365

362366
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)

0 commit comments

Comments
 (0)