mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-21 02:37:44 +00:00
Experiment with a fullscreen toggle.
This commit is contained in:
parent
2bee9b3d56
commit
1f7f9884f5
@ -478,6 +478,18 @@ void MainWindow::addDisplayMenu(const std::string &machinePrefix, const std::str
|
||||
QAction *sVideoAction = nullptr;
|
||||
QAction *rgbAction = nullptr;
|
||||
|
||||
// Add the fullscreen toggle.
|
||||
QAction *const fullscreenToggleAction = new QAction(tr("Toggle fullscreen"));
|
||||
fullscreenToggleAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_F));
|
||||
displayMenu->addAction(fullscreenToggleAction);
|
||||
connect(fullscreenToggleAction, &QAction::triggered, this, [=] {
|
||||
if(window()->isFullScreen()) {
|
||||
window()->showNormal();
|
||||
} else {
|
||||
window()->showFullScreen();
|
||||
}
|
||||
});
|
||||
|
||||
// Add all requested actions.
|
||||
#define Add(name, action) \
|
||||
if(!name.empty()) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user