forked from openlp/openlp
Renderer fixes and change theme export suffix
bzr-revno: 999
This commit is contained in:
commit
6867f64b94
@ -290,7 +290,7 @@ Therefore one table for text, one for outline and one for shadow.
|
|||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def build_html(item, screen, alert):
|
def build_html(item, screen, alert, islive):
|
||||||
"""
|
"""
|
||||||
Build the full web paged structure for display
|
Build the full web paged structure for display
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ def build_html(item, screen, alert):
|
|||||||
build_alert(alert, width),
|
build_alert(alert, width),
|
||||||
build_footer(item),
|
build_footer(item),
|
||||||
build_lyrics(item),
|
build_lyrics(item),
|
||||||
u'true' if theme and theme.display_slideTransition \
|
u'true' if theme and theme.display_slideTransition and islive \
|
||||||
else u'false',
|
else u'false',
|
||||||
image)
|
image)
|
||||||
return html
|
return html
|
||||||
@ -343,7 +343,7 @@ def build_lyrics(item):
|
|||||||
shadow = u'display: none;'
|
shadow = u'display: none;'
|
||||||
if theme:
|
if theme:
|
||||||
lyricscommon = u'width: %spx; height: %spx; word-wrap: break-word; ' \
|
lyricscommon = u'width: %spx; height: %spx; word-wrap: break-word; ' \
|
||||||
u'font-family: %s; font-size: %spx; color: %s; line-height: %d%%;' \
|
u'font-family: %s; font-size: %spt; color: %s; line-height: %d%%;' \
|
||||||
% (item.main.width(), item.main.height(), theme.font_main_name,
|
% (item.main.width(), item.main.height(), theme.font_main_name,
|
||||||
theme.font_main_proportion, theme.font_main_color,
|
theme.font_main_proportion, theme.font_main_color,
|
||||||
100 + int(theme.font_main_line_adjustment))
|
100 + int(theme.font_main_line_adjustment))
|
||||||
@ -398,7 +398,7 @@ def build_footer(item):
|
|||||||
width: %spx;
|
width: %spx;
|
||||||
height: %spx;
|
height: %spx;
|
||||||
font-family: %s;
|
font-family: %s;
|
||||||
font-size: %spx;
|
font-size: %spt;
|
||||||
color: %s;
|
color: %s;
|
||||||
text-align: %s;
|
text-align: %s;
|
||||||
"""
|
"""
|
||||||
@ -427,7 +427,7 @@ def build_alert(alertTab, width):
|
|||||||
width: %s;
|
width: %s;
|
||||||
vertical-align: %s;
|
vertical-align: %s;
|
||||||
font-family: %s;
|
font-family: %s;
|
||||||
font-size: %spx;
|
font-size: %spt;
|
||||||
color: %s;
|
color: %s;
|
||||||
background-color: %s;
|
background-color: %s;
|
||||||
"""
|
"""
|
||||||
|
@ -152,8 +152,8 @@ class MainDisplay(DisplayWidget):
|
|||||||
splash_image)
|
splash_image)
|
||||||
serviceItem = ServiceItem()
|
serviceItem = ServiceItem()
|
||||||
serviceItem.bg_frame = initialFrame
|
serviceItem.bg_frame = initialFrame
|
||||||
self.webView.setHtml(build_html(serviceItem, self.screen, \
|
self.webView.setHtml(build_html(serviceItem, self.screen,
|
||||||
self.parent.alertTab))
|
self.parent.alertTab, self.isLive))
|
||||||
self.initialFrame = True
|
self.initialFrame = True
|
||||||
self.show()
|
self.show()
|
||||||
# To display or not to display?
|
# To display or not to display?
|
||||||
@ -297,6 +297,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
Generates a preview of the image displayed.
|
Generates a preview of the image displayed.
|
||||||
"""
|
"""
|
||||||
log.debug(u'preview for %s', self.isLive)
|
log.debug(u'preview for %s', self.isLive)
|
||||||
|
if self.isLive:
|
||||||
# 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.serviceItem.themedata and \
|
if self.serviceItem.themedata and \
|
||||||
@ -332,7 +333,8 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.loaded = False
|
self.loaded = False
|
||||||
self.initialFrame = False
|
self.initialFrame = False
|
||||||
self.serviceItem = serviceItem
|
self.serviceItem = serviceItem
|
||||||
html = build_html(self.serviceItem, self.screen, self.parent.alertTab)
|
html = build_html(self.serviceItem, self.screen, self.parent.alertTab,\
|
||||||
|
self.isLive)
|
||||||
self.webView.setHtml(html)
|
self.webView.setHtml(html)
|
||||||
if serviceItem.foot_text and serviceItem.foot_text:
|
if serviceItem.foot_text and serviceItem.foot_text:
|
||||||
self.footer(serviceItem.foot_text)
|
self.footer(serviceItem.foot_text)
|
||||||
|
@ -295,7 +295,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
path = unicode(path)
|
path = unicode(path)
|
||||||
if path:
|
if path:
|
||||||
SettingsManager.set_last_dir(self.settingsSection, path, 1)
|
SettingsManager.set_last_dir(self.settingsSection, path, 1)
|
||||||
themePath = os.path.join(path, theme + u'.thz')
|
themePath = os.path.join(path, theme + u'.otz')
|
||||||
zip = None
|
zip = None
|
||||||
try:
|
try:
|
||||||
zip = zipfile.ZipFile(themePath, u'w')
|
zip = zipfile.ZipFile(themePath, u'w')
|
||||||
|
Loading…
Reference in New Issue
Block a user