Skip to content

Commit

Permalink
Update code based on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sgourdas authored Mar 22, 2024
1 parent da22805 commit 95de67c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/kiwixapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,10 @@ void KiwixApp::createActions()
connect(mpa_actions[FindInPageAction], &QAction::triggered,
this, [=]() { getTabWidget()->openFindInPageBar(); });

bool fullScreenKeyUndefined = (QKeySequence(QKeySequence::FullScreen).toString()).isEmpty();
if (fullScreenKeyUndefined) {
CREATE_ACTION_ICON_SHORTCUT(ToggleFullscreenAction, "full-screen-enter", gt("set-fullscreen"), Qt::Key_F11);
} else {
CREATE_ACTION_ICON_SHORTCUT(ToggleFullscreenAction, "full-screen-enter", gt("set-fullscreen"), QKeySequence::FullScreen);
}
const auto fullScreenKeySeq = QKeySequence(QKeySequence::FullScreen).isEmpty()
? Qt::Key_F11
: QKeySequence::FullScreen;
CREATE_ACTION_ICON_SHORTCUT(ToggleFullscreenAction, "full-screen-enter", gt("set-fullscreen"), fullScreenKeySeq);
connect(mpa_actions[ToggleFullscreenAction], &QAction::toggled,
this, [=](bool checked) {
auto action = mpa_actions[ToggleFullscreenAction];
Expand Down

0 comments on commit 95de67c

Please sign in to comment.