Remove Toggle Full Screen menu item for macOS

Enter Full Screen menu item with Fn+F shortcut
is added automatically at runtime in currently
supported macOS versions.
Fixes #4608
This commit is contained in:
Alejandro Martinez
2025-01-26 09:51:44 -03:00
parent 84ad06657e
commit 48c6ebdc1f

View File

@@ -626,8 +626,6 @@ MainWindow::MainWindow(const QDir &home)
QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
#ifndef Q_OS_MAC
viewMenu->addAction(tr("Toggle Full Screen"), this, SLOT(toggleFullScreen()), QKeySequence("F11"));
#else
viewMenu->addAction(tr("Toggle Full Screen"), this, SLOT(toggleFullScreen()));
#endif
showhideViewbar = viewMenu->addAction(tr("Show View Sidebar"), this, SLOT(showViewbar(bool)), QKeySequence("F2"));
showhideViewbar->setCheckable(true);
@@ -1028,14 +1026,7 @@ MainWindow::toggleStyle()
void
MainWindow::toggleFullScreen()
{
#ifdef Q_OS_MAC
QRect screenSize = QGuiApplication::primaryScreen()->availableGeometry();
if (screenSize.width() > frameGeometry().width() ||
screenSize.height() > frameGeometry().height())
showFullScreen();
else
showNormal();
#else
#ifndef Q_OS_MAC
if (fullScreen) fullScreen->toggle();
else qDebug()<<"no fullscreen support compiled in.";
#endif