a 'fix' for presenation previews

This commit is contained in:
Philip Ridout 2018-11-13 21:00:14 +00:00
parent a1e4a5d006
commit 0271962d6d
2 changed files with 10 additions and 3 deletions

View File

@ -152,8 +152,14 @@ class DisplayWindow(QtWidgets.QWidget):
self.setGeometry(screen.display_geometry)
self.screen_number = screen.number
def set_single_image(self, bg_color, image):
image_uri = image.as_uri()
def set_single_image(self, bg_color, image_path):
"""
:param str bg_color:
:param Path image_path:
:return:
"""
image_uri = image_path.as_uri()
self.run_javascript('Display.setFullscreenImage("{bg_color}", "{image}");'.format(bg_color=bg_color,
image=image_uri))

View File

@ -32,6 +32,7 @@ from openlp.core.common import SlideLimits
from openlp.core.common.actions import ActionList, CategoryOrder
from openlp.core.common.i18n import UiStrings, translate
from openlp.core.common.mixins import LogMixin, RegistryProperties
from openlp.core.common.path import Path
from openlp.core.common.registry import Registry, RegistryBase
from openlp.core.common.settings import Settings
from openlp.core.display.screens import ScreenList
@ -1182,7 +1183,7 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
QtCore.QTimer.singleShot(2500, self.grab_maindisplay)
else:
# If not live, use the slide's thumbnail/icon instead
image_path = self.service_item.get_rendered_frame(self.selected_row)
image_path = Path(self.service_item.get_rendered_frame(self.selected_row))
# if self.service_item.is_capable(ItemCapabilities.HasThumbnails):
# image = self.image_manager.get_image(image_path, ImageSource.CommandPlugins)
# self.slide_image = QtGui.QPixmap.fromImage(image)