From 5667d0fd865a6a3d546901a3b4f329a3a0e5ec54 Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Fri, 6 Sep 2024 03:06:32 -0400 Subject: [PATCH] Group RTL Aware Action Def Refactor to reduce repetition --- src/kiwixapp.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index 58fe0e5..bbf7b86 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -385,16 +385,12 @@ void KiwixApp::createActions() if (QGuiApplication::isLeftToRight()) { CREATE_ACTION_ICON_SHORTCUT(HistoryBackAction, "history-left", gt("back"), QKeySequence(Qt::ALT | Qt::Key_Left)); - } else { - CREATE_ACTION_ICON_SHORTCUT(HistoryBackAction, "history-right", gt("back"), QKeySequence(Qt::ALT | Qt::Key_Right)); - } - DISABLE_ACTION(HistoryBackAction); - - if (QGuiApplication::isLeftToRight()) { CREATE_ACTION_ICON_SHORTCUT(HistoryForwardAction, "history-right", gt("forward"), QKeySequence(Qt::ALT | Qt::Key_Right)); } else { + CREATE_ACTION_ICON_SHORTCUT(HistoryBackAction, "history-right", gt("back"), QKeySequence(Qt::ALT | Qt::Key_Right)); CREATE_ACTION_ICON_SHORTCUT(HistoryForwardAction, "history-left", gt("forward"), QKeySequence(Qt::ALT | Qt::Key_Left)); } + DISABLE_ACTION(HistoryBackAction); DISABLE_ACTION(HistoryForwardAction); CREATE_ACTION_ICON_SHORTCUT(PrintAction, "print", gt("print"), QKeySequence::Print);