chore: shortcut-related code tweaks

This commit is contained in:
Gary Wang 2024-11-02 09:32:51 +08:00
parent 2071e82e1d
commit d0bdc71cf5
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760

View File

@ -130,10 +130,10 @@ void ActionManager::retranslateUi(MainWindow *mainWindow)
void ActionManager::setupShortcuts() void ActionManager::setupShortcuts()
{ {
actionOpen->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_O)); actionOpen->setShortcut(QKeySequence::Open);
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0)); actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
actionZoomIn->setShortcut(QKeySequence(QKeySequence::ZoomIn)); actionZoomIn->setShortcut(QKeySequence::ZoomIn);
actionZoomOut->setShortcut(QKeySequence(QKeySequence::ZoomOut)); actionZoomOut->setShortcut(QKeySequence::ZoomOut);
actionPrevPicture->setShortcuts({ actionPrevPicture->setShortcuts({
QKeySequence(Qt::Key_PageUp), QKeySequence(Qt::Key_PageUp),
QKeySequence(Qt::Key_Left), QKeySequence(Qt::Key_Left),
@ -143,7 +143,7 @@ void ActionManager::setupShortcuts()
QKeySequence(Qt::Key_Right), QKeySequence(Qt::Key_Right),
}); });
actionHorizontalFlip->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R)); actionHorizontalFlip->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R));
actionCopyPixmap->setShortcut(QKeySequence(QKeySequence::Copy)); actionCopyPixmap->setShortcut(QKeySequence::Copy);
actionPaste->setShortcut(QKeySequence::Paste); actionPaste->setShortcut(QKeySequence::Paste);
actionTrash->setShortcut(QKeySequence::Delete); actionTrash->setShortcut(QKeySequence::Delete);
actionHelp->setShortcut(QKeySequence::HelpContents); actionHelp->setShortcut(QKeySequence::HelpContents);