summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4d1c16ac..a7d7bddb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -3645,10 +3645,14 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
{
// if the ui is locked, ignore the ALT key event
// alt-tabbing out of a game triggers this
- if (!UILocker::instance().locked()) {
- // if the menubar is hidden, pressing Alt will make it visible
+ auto& uilocker = UILocker::instance();
+ auto& settings = Settings::instance();
+ if (!uilocker.locked()) {
+ // if the menubar is hidden and showMenuBarOnAlt is true,
+ // pressing Alt will make it visible
if (event->key() == Qt::Key_Alt) {
- if (!ui->menuBar->isVisible()) {
+ bool showMenubarOnAlt = settings.interface().showMenubarOnAlt();
+ if (showMenubarOnAlt && !ui->menuBar->isVisible()) {
ui->menuBar->show();
}
}