From bdda14740b6f133d5ecc184f93d59144ce689b57 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 3 Aug 2010 05:56:21 +0100 Subject: [PATCH] More changes --- openlp/core/lib/htmlbuilder.py | 34 +++++++++++++++++++++++++--------- openlp/core/ui/maindisplay.py | 2 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index fc0cb1db1..6f36a5107 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -167,7 +167,8 @@ def build_html(item, screen, alert): build_alert(width, height, alert), build_image(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)) return html @@ -219,6 +220,12 @@ def build_image(width, height): return image % (width, height) def build_image_src(image): + """ + Build display for the backgroung image + + `image` + Image to be displayed + """ image_src = """ """ @@ -293,6 +300,12 @@ def build_lyrics(item): return lyrics_html def build_footer(item): + """ + Build the display of the item footer + + `item` + Service Item to be processed. + """ lyrics = """ #footer {position: absolute; %s z-index:5; %s; %s } """ @@ -312,18 +325,21 @@ def build_footer(item): align = u'align:center;' elif theme.display_horizontalAlign == 1: align = u'align:right;' - if theme.display_verticalAlign == 2: - 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) + text = u'color:%s; %s ' % (theme.font_footer_color, align) lyrics_html = lyrics % (position, font, text) 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 = """ .alertcommon { position: absolute; %s } .alerttable { z-index:8; %s } diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index e979d1180..11f35d679 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -294,7 +294,7 @@ class MainDisplay(DisplayWidget): log.debug(u'buildHtml') self.loaded = False 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) if serviceItem.footer and serviceItem.foot_text: self.frame.findFirstElement('div#footer').setInnerXml(serviceItem.foot_text)