mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Viewer: When restoring from fullscreen go back to maximized state if window was maximized when entering full screen. Fixes #1846753 [Window Size not retained when exiting from full screen in ebook-viewer](https://bugs.launchpad.net/calibre/+bug/1846753)
This commit is contained in:
parent
46dbd9b24b
commit
644071ff0c
@ -66,6 +66,7 @@ class EbookViewer(MainWindow):
|
||||
|
||||
def __init__(self, open_at=None, continue_reading=None):
|
||||
MainWindow.__init__(self, None)
|
||||
self.maximized_at_last_fullscreen = False
|
||||
self.pending_open_at = open_at
|
||||
self.base_window_title = _('E-book viewer')
|
||||
self.setWindowTitle(self.base_window_title)
|
||||
@ -153,7 +154,11 @@ class EbookViewer(MainWindow):
|
||||
# Fullscreen {{{
|
||||
def set_full_screen(self, on):
|
||||
if on:
|
||||
self.maximized_at_last_fullscreen = self.isMaximized()
|
||||
self.showFullScreen()
|
||||
else:
|
||||
if self.maximized_at_last_fullscreen:
|
||||
self.showMaximized()
|
||||
else:
|
||||
self.showNormal()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user