diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index ef2a56aa7..70a688236 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -1757,4 +1757,14 @@ void MainWindow::initViewMenu() connect(m_ui->actionShowPreviewPanel, &QAction::toggled, this, [](bool checked) { config()->set(Config::GUI_HidePreviewPanel, !checked); }); + + connect(m_ui->actionAlwaysOnTop, &QAction::toggled, this, [this](bool checked) { + if (checked) { + setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); + } else { + setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint); + } + show(); + }); + } diff --git a/src/gui/MainWindow.ui b/src/gui/MainWindow.ui index 93488dc05..c76be3516 100644 --- a/src/gui/MainWindow.ui +++ b/src/gui/MainWindow.ui @@ -381,6 +381,7 @@ + @@ -972,6 +973,17 @@ Show Preview Panel + + + true + + + Always on Top + + + Ctrl+Shift+A + +