Skip to content

Commit

Permalink
fix F11 fullscreen toggle shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 1, 2020
1 parent 10e010d commit 0c9ff0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
7 changes: 3 additions & 4 deletions src/mainwindow.cpp
Expand Up @@ -182,7 +182,6 @@ MainWindow::MainWindow()
ui->setupUi(this);
#ifdef Q_OS_MAC
// Qt 5 on OS X supports the standard Full Screen window widget.
ui->mainToolBar->removeAction(ui->actionFullscreen);
ui->actionEnter_Full_Screen->setVisible(false);
// OS X has a standard Full Screen shortcut we should use.
ui->actionEnter_Full_Screen->setShortcut(QKeySequence((Qt::CTRL + Qt::META + Qt::Key_F)));
Expand All @@ -194,8 +193,6 @@ MainWindow::MainWindow()
connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openVideo()));
connect(ui->actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(this, SIGNAL(producerOpened()), this, SLOT(onProducerOpened()));
if (ui->actionFullscreen)
connect(ui->actionFullscreen, SIGNAL(triggered()), this, SLOT(on_actionEnter_Full_Screen_triggered()));
connect(ui->mainToolBar, SIGNAL(visibilityChanged(bool)), SLOT(onToolbarVisibilityChanged(bool)));

// Accept drag-n-drop of files.
Expand Down Expand Up @@ -1157,7 +1154,6 @@ void MainWindow::setFullScreen(bool isFullScreen)
showFullScreen();
#endif
ui->actionEnter_Full_Screen->setVisible(false);
ui->actionFullscreen->setVisible(false);
}
}

Expand Down Expand Up @@ -2216,6 +2212,9 @@ void MainWindow::keyPressEvent(QKeyEvent* event)
m_timelineDock->model()->reload();
m_keyframesDock->model().reload();
break;
case Qt::Key_F11:
on_actionEnter_Full_Screen_triggered();
break;
case Qt::Key_F12:
LOG_DEBUG() << "event isAccepted:" << event->isAccepted();
LOG_DEBUG() << "Current focusWidget:" << QApplication::focusWidget();
Expand Down
12 changes: 0 additions & 12 deletions src/mainwindow.ui
Expand Up @@ -481,18 +481,6 @@
<string>History</string>
</property>
</action>
<action name="actionFullscreen">
<property name="icon">
<iconset theme="view-fullscreen" resource="../icons/resources.qrc">
<normaloff>:/icons/oxygen/32x32/actions/view-fullscreen.png</normaloff>:/icons/oxygen/32x32/actions/view-fullscreen.png</iconset>
</property>
<property name="text">
<string>Full Screen</string>
</property>
<property name="shortcut">
<string>F11</string>
</property>
</action>
<action name="actionRealtime">
<property name="checkable">
<bool>true</bool>
Expand Down

0 comments on commit 0c9ff0f

Please sign in to comment.