Skip to content

Commit

Permalink
Explicitly set linux full screen key
Browse files Browse the repository at this point in the history
on_toggle_fullscreen -> on_toggle_full_screen
  • Loading branch information
RumovZ committed Feb 16, 2022
1 parent 6bc2de1 commit 55f7c86
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions qt/aqt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,8 +1305,10 @@ def setupMenus(self) -> None:
m.actionZoomOut.setShortcut(QKeySequence.StandardKey.ZoomOut)
qconnect(m.actionResetZoom.triggered, lambda: self.web.setZoomFactor(1))
# app-wide shortcut
qconnect(m.actionFullScreen.triggered, self.on_toggle_fullscreen)
m.actionFullScreen.setShortcut(QKeySequence.StandardKey.FullScreen)
qconnect(m.actionFullScreen.triggered, self.on_toggle_full_screen)
m.actionFullScreen.setShortcut(
QKeySequence("F11") if is_lin else QKeySequence.StandardKey.FullScreen
)
m.actionFullScreen.setShortcutContext(Qt.ShortcutContext.ApplicationShortcut)

def updateTitleBar(self) -> None:
Expand All @@ -1315,7 +1317,7 @@ def updateTitleBar(self) -> None:
# View
##########################################################################

def on_toggle_fullscreen(self) -> None:
def on_toggle_full_screen(self) -> None:
window = self.app.activeWindow()
window.setWindowState(window.windowState() ^ Qt.WindowState.WindowFullScreen)

Expand Down

0 comments on commit 55f7c86

Please sign in to comment.