From d0bdc71cf53a364f7791ac61ca2c2018ac57eaf1 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sat, 2 Nov 2024 09:32:51 +0800 Subject: [PATCH] chore: shortcut-related code tweaks --- app/actionmanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/actionmanager.cpp b/app/actionmanager.cpp index 4f5d7c0..37a0092 100644 --- a/app/actionmanager.cpp +++ b/app/actionmanager.cpp @@ -130,10 +130,10 @@ void ActionManager::retranslateUi(MainWindow *mainWindow) void ActionManager::setupShortcuts() { - actionOpen->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_O)); + actionOpen->setShortcut(QKeySequence::Open); actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0)); - actionZoomIn->setShortcut(QKeySequence(QKeySequence::ZoomIn)); - actionZoomOut->setShortcut(QKeySequence(QKeySequence::ZoomOut)); + actionZoomIn->setShortcut(QKeySequence::ZoomIn); + actionZoomOut->setShortcut(QKeySequence::ZoomOut); actionPrevPicture->setShortcuts({ QKeySequence(Qt::Key_PageUp), QKeySequence(Qt::Key_Left), @@ -143,7 +143,7 @@ void ActionManager::setupShortcuts() QKeySequence(Qt::Key_Right), }); actionHorizontalFlip->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R)); - actionCopyPixmap->setShortcut(QKeySequence(QKeySequence::Copy)); + actionCopyPixmap->setShortcut(QKeySequence::Copy); actionPaste->setShortcut(QKeySequence::Paste); actionTrash->setShortcut(QKeySequence::Delete); actionHelp->setShortcut(QKeySequence::HelpContents);