From c6b78597e8e8e15de85ca4f87216f8e6bec60fac Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Fri, 17 Dec 2021 13:36:20 +0800 Subject: [PATCH] shortcuts: left/right for prev/next image, hide open action from menu --- app/actionmanager.cpp | 10 ++++++++-- app/mainwindow.cpp | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/actionmanager.cpp b/app/actionmanager.cpp index 5ea2b85..63d803c 100644 --- a/app/actionmanager.cpp +++ b/app/actionmanager.cpp @@ -96,8 +96,14 @@ void ActionManager::setupShortcuts() actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0)); actionZoomIn->setShortcut(QKeySequence(QKeySequence::ZoomIn)); actionZoomOut->setShortcut(QKeySequence(QKeySequence::ZoomOut)); - actionPrevPicture->setShortcut(QKeySequence(Qt::Key_PageUp)); - actionNextPicture->setShortcut(QKeySequence(Qt::Key_PageDown)); + actionPrevPicture->setShortcuts({ + QKeySequence(Qt::Key_PageUp), + QKeySequence(Qt::Key_Left), + }); + actionNextPicture->setShortcuts({ + QKeySequence(Qt::Key_PageDown), + QKeySequence(Qt::Key_Right), + }); actionHorizontalFlip->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R)); actionCopyPixmap->setShortcut(QKeySequence(QKeySequence::Copy)); actionPaste->setShortcut(QKeySequence::Paste); diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index 266eff3..e18e83a 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -408,7 +408,9 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event) QAction * helpAction = m_am->actionHelp; QAction * propertiesAction = m_am->actionProperties; +#if 0 menu->addAction(m_am->actionOpen); +#endif // 0 if (copyMenu->actions().count() == 1) { menu->addActions(copyMenu->actions());