forked from openlp/openlp
More changes
This commit is contained in:
parent
82aa9c333a
commit
bdda14740b
@ -167,7 +167,8 @@ def build_html(item, screen, alert):
|
|||||||
build_alert(width, height, alert),
|
build_alert(width, height, alert),
|
||||||
build_image(width, height),
|
build_image(width, height),
|
||||||
build_blank(width, height),
|
build_blank(width, height),
|
||||||
"true" if theme and theme.display_slideTransition else "false",
|
"true" if theme and
|
||||||
|
theme.display_slideTransition else "false",
|
||||||
build_image_src(item.bg_frame))
|
build_image_src(item.bg_frame))
|
||||||
return html
|
return html
|
||||||
|
|
||||||
@ -219,6 +220,12 @@ def build_image(width, height):
|
|||||||
return image % (width, height)
|
return image % (width, height)
|
||||||
|
|
||||||
def build_image_src(image):
|
def build_image_src(image):
|
||||||
|
"""
|
||||||
|
Build display for the backgroung image
|
||||||
|
|
||||||
|
`image`
|
||||||
|
Image to be displayed
|
||||||
|
"""
|
||||||
image_src = """
|
image_src = """
|
||||||
<img src="data:image/png;base64,%s">
|
<img src="data:image/png;base64,%s">
|
||||||
"""
|
"""
|
||||||
@ -293,6 +300,12 @@ def build_lyrics(item):
|
|||||||
return lyrics_html
|
return lyrics_html
|
||||||
|
|
||||||
def build_footer(item):
|
def build_footer(item):
|
||||||
|
"""
|
||||||
|
Build the display of the item footer
|
||||||
|
|
||||||
|
`item`
|
||||||
|
Service Item to be processed.
|
||||||
|
"""
|
||||||
lyrics = """
|
lyrics = """
|
||||||
#footer {position: absolute; %s z-index:5; %s; %s }
|
#footer {position: absolute; %s z-index:5; %s; %s }
|
||||||
"""
|
"""
|
||||||
@ -312,18 +325,21 @@ def build_footer(item):
|
|||||||
align = u'align:center;'
|
align = u'align:center;'
|
||||||
elif theme.display_horizontalAlign == 1:
|
elif theme.display_horizontalAlign == 1:
|
||||||
align = u'align:right;'
|
align = u'align:right;'
|
||||||
if theme.display_verticalAlign == 2:
|
text = u'color:%s; %s ' % (theme.font_footer_color, align)
|
||||||
valign = u'vertical-align:bottom;'
|
|
||||||
elif theme.display_verticalAlign == 1:
|
|
||||||
valign = u'vertical-align:middle;'
|
|
||||||
else:
|
|
||||||
valign = u'vertical-align:top;'
|
|
||||||
text = u'color:%s; %s %s' % (theme.font_footer_color, align, valign)
|
|
||||||
lyrics_html = lyrics % (position, font, text)
|
lyrics_html = lyrics % (position, font, text)
|
||||||
return lyrics_html
|
return lyrics_html
|
||||||
|
|
||||||
|
def build_alert(width, height, alertTab):
|
||||||
|
"""
|
||||||
|
Build the display of the footer
|
||||||
|
|
||||||
def build_alert(width, height, alertTab):#
|
`width`
|
||||||
|
Screen Width
|
||||||
|
`height`
|
||||||
|
Screen height
|
||||||
|
`alertTab`
|
||||||
|
Details from the Alert tab for fonts etc
|
||||||
|
"""
|
||||||
style = """
|
style = """
|
||||||
.alertcommon { position: absolute; %s }
|
.alertcommon { position: absolute; %s }
|
||||||
.alerttable { z-index:8; %s }
|
.alerttable { z-index:8; %s }
|
||||||
|
@ -294,7 +294,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
log.debug(u'buildHtml')
|
log.debug(u'buildHtml')
|
||||||
self.loaded = False
|
self.loaded = False
|
||||||
self.serviceItem = serviceItem
|
self.serviceItem = serviceItem
|
||||||
html = build_html(self.serviceItem, self.screen, self.parent.alertTab)
|
html = build_html(self.serviceItem, self.screen, None)
|
||||||
self.webView.setHtml(html)
|
self.webView.setHtml(html)
|
||||||
if serviceItem.footer and serviceItem.foot_text:
|
if serviceItem.footer and serviceItem.foot_text:
|
||||||
self.frame.findFirstElement('div#footer').setInnerXml(serviceItem.foot_text)
|
self.frame.findFirstElement('div#footer').setInnerXml(serviceItem.foot_text)
|
||||||
|
Loading…
Reference in New Issue
Block a user