mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Fix disabling the fullscreen help message causing the Esc key to stop working
This commit is contained in:
parent
68c77002af
commit
7fc2c30ed2
@ -510,11 +510,12 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
def show_full_screen_label(self):
|
def show_full_screen_label(self):
|
||||||
f = self.full_screen_label
|
f = self.full_screen_label
|
||||||
self.esc_full_screen_action.setEnabled(True)
|
self.esc_full_screen_action.setEnabled(True)
|
||||||
f.setVisible(True)
|
|
||||||
height = 200
|
height = 200
|
||||||
width = int(0.7*self.view.width())
|
width = int(0.7*self.view.width())
|
||||||
f.resize(width, height)
|
f.resize(width, height)
|
||||||
f.move((self.view.width() - width)//2, (self.view.height()-height)//2)
|
f.move((self.view.width() - width)//2, (self.view.height()-height)//2)
|
||||||
|
if self.view.document.show_fullscreen_help:
|
||||||
|
f.setVisible(True)
|
||||||
a = self.full_screen_label_anim
|
a = self.full_screen_label_anim
|
||||||
a.setDuration(500)
|
a.setDuration(500)
|
||||||
a.setStartValue(QSize(width, 0))
|
a.setStartValue(QSize(width, 0))
|
||||||
@ -591,7 +592,6 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
fs = self.window_mode_changed == 'fullscreen'
|
fs = self.window_mode_changed == 'fullscreen'
|
||||||
self.window_mode_changed = None
|
self.window_mode_changed = None
|
||||||
if fs:
|
if fs:
|
||||||
if self.view.document.show_fullscreen_help:
|
|
||||||
self.show_full_screen_label()
|
self.show_full_screen_label()
|
||||||
else:
|
else:
|
||||||
self.view.document.switch_to_window_mode()
|
self.view.document.switch_to_window_mode()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user