Skip to content

Commit

Permalink
Merge pull request #1068 from sgourdas/feature/fullscreen_shortcut
Browse files Browse the repository at this point in the history
On undefined fullscreen key sequence, hardcode to F11
  • Loading branch information
kelson42 authored Mar 22, 2024
2 parents d4aacc4 + 95de67c commit 398a4fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/kiwixapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,11 @@ void KiwixApp::createActions()
mpa_actions[FindInPageAction]->setShortcuts({QKeySequence::Find, Qt::Key_F3});
connect(mpa_actions[FindInPageAction], &QAction::triggered,
this, [=]() { getTabWidget()->openFindInPageBar(); });

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 398a4fc

Please sign in to comment.