mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-21 11:08:54 -04:00
Group RTL Aware Action Def
Refactor to reduce repetition
This commit is contained in:
parent
925407f683
commit
5667d0fd86
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user