forked from openlp/openlp
Theme Editing now previews and RenderManager Cleanups
This commit is contained in:
parent
45b12cf462
commit
6c3f21dfb0
@ -146,7 +146,10 @@ class RenderManager(object):
|
|||||||
if self.theme != self.renderer.theme_name or self.themedata is None \
|
if self.theme != self.renderer.theme_name or self.themedata is None \
|
||||||
or overrideLevels:
|
or overrideLevels:
|
||||||
log.debug(u'theme is now %s', self.theme)
|
log.debug(u'theme is now %s', self.theme)
|
||||||
self.themedata = self.theme_manager.getThemeData(self.theme)
|
if overrideLevels:
|
||||||
|
self.themedata = theme
|
||||||
|
else:
|
||||||
|
self.themedata = self.theme_manager.getThemeData(self.theme)
|
||||||
self.calculate_default(self.screens.current[u'size'])
|
self.calculate_default(self.screens.current[u'size'])
|
||||||
self.renderer.set_theme(self.themedata)
|
self.renderer.set_theme(self.themedata)
|
||||||
self.build_text_rectangle(self.themedata)
|
self.build_text_rectangle(self.themedata)
|
||||||
@ -198,6 +201,8 @@ class RenderManager(object):
|
|||||||
footer.append(u'Amazing Grace (John Newton)' )
|
footer.append(u'Amazing Grace (John Newton)' )
|
||||||
footer.append(u'Public Domain')
|
footer.append(u'Public Domain')
|
||||||
footer.append(u'CCLI 123456')
|
footer.append(u'CCLI 123456')
|
||||||
|
# Previews do not need the transition switched on!
|
||||||
|
themedata.display_slideTransition = False
|
||||||
# build a service item to generate preview
|
# build a service item to generate preview
|
||||||
serviceItem = ServiceItem()
|
serviceItem = ServiceItem()
|
||||||
serviceItem.theme = themedata
|
serviceItem.theme = themedata
|
||||||
|
@ -147,7 +147,7 @@ class ServiceItem(object):
|
|||||||
if self.service_item_type == ServiceItemType.Text:
|
if self.service_item_type == ServiceItemType.Text:
|
||||||
log.debug(u'Formatting slides')
|
log.debug(u'Formatting slides')
|
||||||
theme = None
|
theme = None
|
||||||
if not self.theme:
|
if self.theme:
|
||||||
theme = self.theme
|
theme = self.theme
|
||||||
self.main, self.footer = \
|
self.main, self.footer = \
|
||||||
self.render_manager.set_override_theme(theme, useOverride)
|
self.render_manager.set_override_theme(theme, useOverride)
|
||||||
|
@ -279,8 +279,9 @@ class MainDisplay(DisplayWidget):
|
|||||||
log.debug(u'preview')
|
log.debug(u'preview')
|
||||||
# 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 !
|
||||||
while self.frame.evaluateJavaScript("fadeFinished()").toString() == u'false':
|
if self.serviceItem.themedata.display_slideTransition:
|
||||||
Receiver.send_message(u'openlp_process_events')
|
while self.frame.evaluateJavaScript("fadeFinished()").toString() == u'false':
|
||||||
|
Receiver.send_message(u'openlp_process_events')
|
||||||
# Wait for the webview to update before geting the preview.
|
# Wait for the webview to update before geting the preview.
|
||||||
# Important otherwise first preview will miss the background !
|
# Important otherwise first preview will miss the background !
|
||||||
while not self.loaded:
|
while not self.loaded:
|
||||||
|
Loading…
Reference in New Issue
Block a user