mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user