← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~j-corwin/openlp/render into lp:openlp

 

Jonathan Corwin has proposed merging lp:~j-corwin/openlp/render into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  #630233 Bars at the top and bottom of the projection screen show desktop
  https://bugs.launchpad.net/bugs/630233
  #633524 Song footer cannot be left aligned/justified when the lyrics aren't horizontally aligned to the left
  https://bugs.launchpad.net/bugs/633524
  #633527 Footer text wraps off the screen
  https://bugs.launchpad.net/bugs/633527


Footer changes: Now bottom aligned, long text is truncated rather than wrapped and it is left-aligned as per v1.2, until such time footer can have it's own horizontal alignment setting

-- 
https://code.launchpad.net/~j-corwin/openlp/render/+merge/34930
Your team OpenLP Core is requested to review the proposed merge of lp:~j-corwin/openlp/render into lp:openlp.
=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py	2010-09-08 18:12:16 +0000
+++ openlp/core/lib/htmlbuilder.py	2010-09-08 22:15:58 +0000
@@ -279,7 +279,7 @@
     html = HTMLSRC % (build_background_css(item, width, height),
         width, height,
         build_alert_css(alert, width),
-        build_footer_css(item),
+        build_footer_css(item, height),
         build_lyrics_css(item, webkitvers),
         u'true' if theme and theme.display_slideTransition and islive \
             else u'false',
@@ -503,7 +503,7 @@
         u'class="lyricscell lyricsmain"></div></div>'
     return lyrics
 
-def build_footer_css(item):
+def build_footer_css(item, height):
     """
     Build the display of the item footer
 
@@ -512,26 +512,22 @@
     """
     style = """
     left: %spx;
-    top: %spx;
+    bottom: %spx;
     width: %spx;
     height: %spx;
     font-family: %s;
     font-size: %spt;
     color: %s;
-    text-align: %s;
+    text-align: left;
+    white-space:nowrap;    
     """
     theme = item.themedata
     if not theme or not item.footer:
         return u''
-    if theme.display_horizontalAlign == 2:
-        align = u'center'
-    elif theme.display_horizontalAlign == 1:
-        align = u'right'
-    else:
-        align = u'left'
-    lyrics_html = style % (item.footer.x(), item.footer.y(),
+    bottom = height - int(item.footer.y()) - int(item.footer.height())
+    lyrics_html = style % (item.footer.x(), bottom,
         item.footer.width(), item.footer.height(), theme.font_footer_name,
-        theme.font_footer_proportion, theme.font_footer_color, align)
+        theme.font_footer_proportion, theme.font_footer_color)
     return lyrics_html
 
 def build_alert_css(alertTab, width):

=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py	2010-08-21 07:46:00 +0000
+++ openlp/core/lib/theme.py	2010-09-08 22:15:58 +0000
@@ -56,7 +56,7 @@
       <weight>Normal</weight>
       <italics>False</italics>
       <line_adjustment>0</line_adjustment>
-      <location override="False" x="10" y="10" width="1004" height="730"/>
+      <location override="False" x="10" y="10" width="1004" height="690"/>
    </font>
    <font type="footer">
       <name>Arial</name>
@@ -65,7 +65,7 @@
       <weight>Normal</weight>
       <italics>False</italics>
       <line_adjustment>0</line_adjustment>
-      <location override="False" x="10" y="730" width="1004" height="38"/>
+      <location override="False" x="10" y="690" width="1004" height="78"/>
    </font>
    <display>
       <shadow color="#000000" size="5">True</shadow>


Follow ups