diff --git a/app/actionmanager.cpp b/app/actionmanager.cpp index c6e9944..65c4515 100644 --- a/app/actionmanager.cpp +++ b/app/actionmanager.cpp @@ -57,10 +57,11 @@ void ActionManager::retranslateUi(MainWindow *mainWindow) void ActionManager::setupShortcuts() { + actionZoomIn->setShortcut(QKeySequence(QKeySequence::ZoomIn)); + actionZoomOut->setShortcut(QKeySequence(QKeySequence::ZoomOut)); actionQuitApp->setShortcuts({ QKeySequence(Qt::Key_Space), QKeySequence(Qt::Key_Escape) }); - actionQuitApp->setShortcutContext(Qt::ApplicationShortcut); } diff --git a/app/framelesswindow.cpp b/app/framelesswindow.cpp index 7a2f80c..e408594 100644 --- a/app/framelesswindow.cpp +++ b/app/framelesswindow.cpp @@ -11,7 +11,10 @@ FramelessWindow::FramelessWindow(QWidget *parent) : QWidget(parent) , m_centralLayout(new QVBoxLayout(this)) { - this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint); + // A frameless window has the Qt::WindowTitleHint flag seems wrong, + // but it's a workaround of the following bug (also see the focused comment): + // https://bugreports.qt.io/browse/QTBUG-8361?focusedCommentId=542002#comment-542002 + this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::FramelessWindowHint); m_centralLayout->setMargin(0); }