mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-23 03:58:56 -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()) {
|
if (QGuiApplication::isLeftToRight()) {
|
||||||
CREATE_ACTION_ICON_SHORTCUT(HistoryBackAction, "history-left", gt("back"), QKeySequence(Qt::ALT | Qt::Key_Left));
|
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));
|
CREATE_ACTION_ICON_SHORTCUT(HistoryForwardAction, "history-right", gt("forward"), QKeySequence(Qt::ALT | Qt::Key_Right));
|
||||||
} else {
|
} 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));
|
CREATE_ACTION_ICON_SHORTCUT(HistoryForwardAction, "history-left", gt("forward"), QKeySequence(Qt::ALT | Qt::Key_Left));
|
||||||
}
|
}
|
||||||
|
DISABLE_ACTION(HistoryBackAction);
|
||||||
DISABLE_ACTION(HistoryForwardAction);
|
DISABLE_ACTION(HistoryForwardAction);
|
||||||
|
|
||||||
CREATE_ACTION_ICON_SHORTCUT(PrintAction, "print", gt("print"), QKeySequence::Print);
|
CREATE_ACTION_ICON_SHORTCUT(PrintAction, "print", gt("print"), QKeySequence::Print);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user