forked from openlp/openlp
Renderer cleanups and fixes
This commit is contained in:
parent
98e4b47d91
commit
f9f4cc2518
@ -193,17 +193,17 @@ class RenderManager(object):
|
||||
self.renderer.set_theme(themedata)
|
||||
self.build_text_rectangle(themedata)
|
||||
self.renderer.set_frame_dest(self.width, self.height, True)
|
||||
verse = []
|
||||
verse.append(u'Amazing Grace!')
|
||||
verse.append(u'How sweet the sound')
|
||||
verse.append(u'To save a wretch like me;')
|
||||
verse.append(u'I once was lost but now am found,')
|
||||
verse.append(u'Was blind, but now I see.')
|
||||
verse = u'Amazing Grace!\n'\
|
||||
'How sweet the sound\n'\
|
||||
'To save a wretch like me;\n'\
|
||||
'I once was lost but now am found,\n'\
|
||||
'Was blind, but now I see.'
|
||||
footer = []
|
||||
footer.append(u'Amazing Grace (John Newton)' )
|
||||
footer.append(u'Public Domain')
|
||||
footer.append(u'CCLI xxx')
|
||||
return self.renderer.generate_frame_from_lines(verse, footer)
|
||||
formatted = self.renderer.format_slide(verse, False)
|
||||
return self.renderer.generate_frame_from_lines(formatted[0], footer)
|
||||
|
||||
def format_slide(self, words):
|
||||
"""
|
||||
|
@ -105,7 +105,7 @@ class ServiceItem(object):
|
||||
lines += line + u'\n'
|
||||
title = lines.split(u'\n')[0]
|
||||
self._display_frames.append({u'title': title, u'text': lines})
|
||||
log.info(u'Formatting took %4s' % (time.time() - before))
|
||||
log.log(15, u'Formatting took %4s' % (time.time() - before))
|
||||
elif self.service_item_type == ServiceItemType.Image:
|
||||
for slide in self._raw_frames:
|
||||
slide[u'image'] = \
|
||||
|
@ -488,7 +488,7 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
Blank the screen.
|
||||
"""
|
||||
if self.serviceItem.is_command():
|
||||
if self.serviceItem and self.serviceItem.is_command():
|
||||
if blanked:
|
||||
Receiver().send_message(u'%s_blank'% self.serviceItem.name.lower())
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user