forked from openlp/openlp
Fix review comments
This commit is contained in:
parent
b1d312626a
commit
d50ffbafa3
@ -105,18 +105,6 @@ class Renderer(object):
|
||||
(build_lyrics_format_css(self._theme, self.page_width,
|
||||
self.page_height), build_lyrics_outline_css(self._theme))
|
||||
|
||||
self.web = QtWebKit.QWebView()
|
||||
self.web.resize(self._rect.width(), self._rect.height())
|
||||
self.web.setVisible(False)
|
||||
self.web_frame = self.web.page().mainFrame()
|
||||
# Adjust width and height to account for shadow. outline done in css
|
||||
self.page_width = self._rect.width() - int(self._theme.display_shadow_size)
|
||||
self.page_height = self._rect.height() - int(self._theme.display_shadow_size)
|
||||
self.page_shell = u'<html><head><style>#main {%s %s}</style><body>' \
|
||||
u'<div id="main">' % \
|
||||
(build_lyrics_format_css(self._theme, self.page_width, self.page_height),
|
||||
build_lyrics_outline_css(self._theme))
|
||||
|
||||
def set_frame_dest(self, frame_width, frame_height):
|
||||
"""
|
||||
Set the size of the slide.
|
||||
|
@ -326,8 +326,9 @@ class MainDisplay(DisplayWidget):
|
||||
# Important otherwise first preview will miss the background !
|
||||
while not self.loaded:
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
if self.isLive:
|
||||
self.setVisible(True)
|
||||
# if was hidden keep it hidden
|
||||
if self.hide_mode and self.isLive:
|
||||
self.hideDisplay(self.hide_mode)
|
||||
preview = QtGui.QImage(self.screen[u'size'].width(),
|
||||
self.screen[u'size'].height(),
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
@ -335,9 +336,6 @@ class MainDisplay(DisplayWidget):
|
||||
painter.setRenderHint(QtGui.QPainter.Antialiasing)
|
||||
self.frame.render(painter)
|
||||
painter.end()
|
||||
# if was hidden keep it hidden
|
||||
if self.hide_mode and self.isLive:
|
||||
self.hideDisplay(self.hide_mode)
|
||||
return preview
|
||||
|
||||
def buildHtml(self, serviceItem):
|
||||
|
Loading…
Reference in New Issue
Block a user