Skip to content

Commit

Permalink
Accelerator keys for zoom are not always fetched at menu level
Browse files Browse the repository at this point in the history
When the key events for zooming are first fetched at canvas level,
they will not be propagated to the menu level on wxGTK.

This commit adds yet another workaround to the already existing long list.
  • Loading branch information
tobiolo committed Sep 12, 2023
1 parent cbc20b1 commit 842b620
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,14 @@ struct Document {
}
return Action(
dc, shift ? (ctrl ? A_PREVFILE : A_PREV) : (ctrl ? A_NEXTFILE : A_NEXT));
case WXK_PAGEUP:
if (ctrl) return Action(dc, A_ZOOMIN);
sw->CursorScroll(0, -g_scrollratecursor);
return nullptr;
case WXK_PAGEDOWN:
if (ctrl) return Action(dc, A_ZOOMOUT);
sw->CursorScroll(0, g_scrollratecursor);
return nullptr;
#endif
}
} else if (uk >= ' ') {
Expand Down

0 comments on commit 842b620

Please sign in to comment.