forked from openlp/openlp
More workarounds for bug 1531319.
Fixes: https://launchpad.net/bugs/1531319
This commit is contained in:
parent
aa8af06f79
commit
17d6f13ac0
@ -326,6 +326,9 @@ class MainDisplay(OpenLPMixin, Display, RegistryProperties):
|
|||||||
else:
|
else:
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
self.setGeometry(self.screen['size'])
|
self.setGeometry(self.screen['size'])
|
||||||
|
# Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
||||||
|
if is_win():
|
||||||
|
self.shake_web_view()
|
||||||
|
|
||||||
def direct_image(self, path, background):
|
def direct_image(self, path, background):
|
||||||
"""
|
"""
|
||||||
@ -395,8 +398,17 @@ class MainDisplay(OpenLPMixin, Display, RegistryProperties):
|
|||||||
# Wait for the fade to finish before geting the preview.
|
# Wait for the fade to finish before geting the preview.
|
||||||
# Important otherwise preview will have incorrect text if at all!
|
# Important otherwise preview will have incorrect text if at all!
|
||||||
if self.service_item.theme_data and self.service_item.theme_data.display_slide_transition:
|
if self.service_item.theme_data and self.service_item.theme_data.display_slide_transition:
|
||||||
|
# Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
||||||
|
if is_win():
|
||||||
|
fade_shake_timer = QtCore.QTimer(self)
|
||||||
|
fade_shake_timer.setInterval(25)
|
||||||
|
fade_shake_timer.timeout.connect(self.shake_web_view)
|
||||||
|
fade_shake_timer.start()
|
||||||
while not self.frame.evaluateJavaScript('show_text_completed()'):
|
while not self.frame.evaluateJavaScript('show_text_completed()'):
|
||||||
self.application.process_events()
|
self.application.process_events()
|
||||||
|
# Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
||||||
|
if is_win():
|
||||||
|
fade_shake_timer.stop()
|
||||||
# Wait for the webview to update before getting the preview.
|
# Wait for the webview to update before getting the preview.
|
||||||
# Important otherwise first preview will miss the background !
|
# Important otherwise first preview will miss the background !
|
||||||
while not self.web_loaded:
|
while not self.web_loaded:
|
||||||
@ -493,6 +505,9 @@ class MainDisplay(OpenLPMixin, Display, RegistryProperties):
|
|||||||
if self.isHidden():
|
if self.isHidden():
|
||||||
self.setVisible(True)
|
self.setVisible(True)
|
||||||
self.web_view.setVisible(True)
|
self.web_view.setVisible(True)
|
||||||
|
# Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
||||||
|
if is_win():
|
||||||
|
self.shake_web_view()
|
||||||
self.hide_mode = mode
|
self.hide_mode = mode
|
||||||
|
|
||||||
def show_display(self):
|
def show_display(self):
|
||||||
@ -511,6 +526,9 @@ class MainDisplay(OpenLPMixin, Display, RegistryProperties):
|
|||||||
# Trigger actions when display is active again.
|
# Trigger actions when display is active again.
|
||||||
if self.is_live:
|
if self.is_live:
|
||||||
Registry().execute('live_display_active')
|
Registry().execute('live_display_active')
|
||||||
|
# Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
||||||
|
if is_win():
|
||||||
|
self.shake_web_view()
|
||||||
|
|
||||||
def _hide_mouse(self):
|
def _hide_mouse(self):
|
||||||
"""
|
"""
|
||||||
|
@ -1101,9 +1101,6 @@ class SlideController(DisplayController, RegistryProperties):
|
|||||||
self.display.image(to_display)
|
self.display.image(to_display)
|
||||||
# reset the store used to display first image
|
# reset the store used to display first image
|
||||||
self.service_item.bg_image_bytes = None
|
self.service_item.bg_image_bytes = None
|
||||||
# Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
|
||||||
if self.is_live and is_win():
|
|
||||||
self.display.shake_web_view()
|
|
||||||
self.selected_row = row
|
self.selected_row = row
|
||||||
self.update_preview()
|
self.update_preview()
|
||||||
self.preview_widget.change_slide(row)
|
self.preview_widget.change_slide(row)
|
||||||
@ -1128,8 +1125,8 @@ class SlideController(DisplayController, RegistryProperties):
|
|||||||
self.log_debug('update_preview %s ' % self.screens.current['primary'])
|
self.log_debug('update_preview %s ' % self.screens.current['primary'])
|
||||||
if self.service_item and self.service_item.is_capable(ItemCapabilities.ProvidesOwnDisplay):
|
if self.service_item and self.service_item.is_capable(ItemCapabilities.ProvidesOwnDisplay):
|
||||||
# Grab now, but try again in a couple of seconds if slide change is slow
|
# Grab now, but try again in a couple of seconds if slide change is slow
|
||||||
QtCore.QTimer.singleShot(0.5, self.grab_maindisplay)
|
QtCore.QTimer.singleShot(500, self.grab_maindisplay)
|
||||||
QtCore.QTimer.singleShot(2.5, self.grab_maindisplay)
|
QtCore.QTimer.singleShot(2500, self.grab_maindisplay)
|
||||||
else:
|
else:
|
||||||
self.slide_image = self.display.preview()
|
self.slide_image = self.display.preview()
|
||||||
self.slide_image.setDevicePixelRatio(self.main_window.devicePixelRatio())
|
self.slide_image.setDevicePixelRatio(self.main_window.devicePixelRatio())
|
||||||
|
Loading…
Reference in New Issue
Block a user