@@ -899,19 +899,23 @@ def onActionFullscreenTriggered(self):
899
899
"""
900
900
logger .info ("Fullscreen action triggered" )
901
901
902
+ # Check if the window is currently in fullscreen mode
902
903
if self .isFullScreen ():
903
- self ._toolBar .show ()
904
- self .showNormal ()
905
- self ._mainController .updateCentralWidgetContent ()
904
+ self ._toolBar .show () # Show the toolbar
905
+ self .showNormal () # Restore the window to normal mode
906
+ self ._mainController .updateCentralWidgetContent () # Update the central widget content
906
907
908
+ # Disable global shortcuts when exiting fullscreen mode
907
909
for shortcut in self ._globalShortcuts :
908
910
shortcut .setEnabled (False )
909
911
910
912
else :
911
- self .showFullScreen ()
913
+ # Enter fullscreen mode
914
+ self .showFullScreen () # Switch the window to fullscreen mode
912
915
self ._toolBar .hide ()
913
- self ._mainController .updateCentralWidgetContent ()
916
+ self ._mainController .updateCentralWidgetContent () # Update the central widget content
914
917
918
+ # Enable global shortcuts when entering fullscreen mode
915
919
for shortcut in self ._globalShortcuts :
916
920
shortcut .setEnabled (True )
917
921
@@ -977,17 +981,6 @@ def onActionAboutTriggered(self) -> None:
977
981
978
982
logger .debug ("UI setup for AboutView completed" )
979
983
980
- # description = self.tr(
981
- # f'<h3>{APP_NAME} - v{VERSION}</h3><br/>A minimalist comic book reader.\
982
- # <br/><br/>GNU General Public License v3 (<a href="{LICENSE_URL}">GPLv3</a>) <br/><br/>{COPYRIGHT}<br/><br/>'
983
- # )
984
-
985
- # QMessageBox.about(
986
- # self,
987
- # f"About {APP_NAME}",
988
- # description,
989
- # )
990
-
991
984
def closeEvent (self , event : "QCloseEvent" ) -> None :
992
985
"""
993
986
Handles the close event of the main window.
@@ -1001,5 +994,3 @@ def closeEvent(self, event: "QCloseEvent") -> None:
1001
994
1002
995
self ._mainController .saveData ()
1003
996
event .accept ()
1004
-
1005
- # super().close()
0 commit comments