shortcuts: left/right for prev/next image, hide open action from menu

This commit is contained in:
Gary Wang 2021-12-17 13:36:20 +08:00
parent f202bb58f4
commit c6b78597e8
2 changed files with 10 additions and 2 deletions

View File

@ -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);

View File

@ -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());