File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -800,15 +800,20 @@ def _overviewState(self, oldState: MainWindowState) -> None:
800800 def _reviewState (self , oldState : MainWindowState ) -> None :
801801 self .reviewer .show ()
802802
803- if self .fullscreen :
804- self .hide_menubar ()
803+ fullscreen_was_checked = False
805804
806805 if self .pm .hide_top_bar ():
807806 self .toolbarWeb .hide_timer .setInterval (500 )
808807 self .toolbarWeb .hide_timer .start ()
808+
809+ # check the `hide_if_allowed` method in `qt/aqt/toolbar.py`
810+ fullscreen_was_checked = True
809811 else :
810812 self .toolbarWeb .flatten ()
811813
814+ if not fullscreen_was_checked and self .fullscreen :
815+ self .hide_menubar ()
816+
812817 if self .pm .hide_bottom_bar ():
813818 self .bottomWeb .hide_timer .setInterval (500 )
814819 self .bottomWeb .hide_timer .start ()
Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ def hide_if_allowed(self) -> None:
9898 if self .mw .state != "review" :
9999 return
100100
101+ # Invariant: The `hide_if_allowed` method ensures that the fullscreen state is checked
102+ # and the menubar will be hidden if necessary
103+ # Note: The `eventFilter` and `_reviewState` methods in `qt/aqt/main.py` rely on this invariant
101104 if self .mw .fullscreen :
102105 self .mw .hide_menubar ()
103106
You can’t perform that action at this time.
0 commit comments