All verse types have auto numbering

This commit is contained in:
Derek Scotney 2010-09-09 20:30:38 +02:00
commit 198cd94011
2 changed files with 11 additions and 16 deletions

View File

@ -279,7 +279,7 @@ def build_html(item, screen, alert, islive):
html = HTMLSRC % (build_background_css(item, width, height), html = HTMLSRC % (build_background_css(item, width, height),
width, height, width, height,
build_alert_css(alert, width), build_alert_css(alert, width),
build_footer_css(item), build_footer_css(item, height),
build_lyrics_css(item, webkitvers), build_lyrics_css(item, webkitvers),
u'true' if theme and theme.display_slideTransition and islive \ u'true' if theme and theme.display_slideTransition and islive \
else u'false', else u'false',
@ -503,7 +503,7 @@ def build_lyrics_html(item, webkitvers):
u'class="lyricscell lyricsmain"></div></div>' u'class="lyricscell lyricsmain"></div></div>'
return lyrics return lyrics
def build_footer_css(item): def build_footer_css(item, height):
""" """
Build the display of the item footer Build the display of the item footer
@ -512,26 +512,21 @@ def build_footer_css(item):
""" """
style = """ style = """
left: %spx; left: %spx;
top: %spx; bottom: %spx;
width: %spx; width: %spx;
height: %spx;
font-family: %s; font-family: %s;
font-size: %spt; font-size: %spt;
color: %s; color: %s;
text-align: %s; text-align: left;
white-space:nowrap;
""" """
theme = item.themedata theme = item.themedata
if not theme or not item.footer: if not theme or not item.footer:
return u'' return u''
if theme.display_horizontalAlign == 2: bottom = height - int(item.footer.y()) - int(item.footer.height())
align = u'center' lyrics_html = style % (item.footer.x(), bottom,
elif theme.display_horizontalAlign == 1: item.footer.width(), theme.font_footer_name,
align = u'right' theme.font_footer_proportion, theme.font_footer_color)
else:
align = u'left'
lyrics_html = style % (item.footer.x(), item.footer.y(),
item.footer.width(), item.footer.height(), theme.font_footer_name,
theme.font_footer_proportion, theme.font_footer_color, align)
return lyrics_html return lyrics_html
def build_alert_css(alertTab, width): def build_alert_css(alertTab, width):

View File

@ -56,7 +56,7 @@ BLANK_THEME_XML = \
<weight>Normal</weight> <weight>Normal</weight>
<italics>False</italics> <italics>False</italics>
<line_adjustment>0</line_adjustment> <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>
<font type="footer"> <font type="footer">
<name>Arial</name> <name>Arial</name>
@ -65,7 +65,7 @@ BLANK_THEME_XML = \
<weight>Normal</weight> <weight>Normal</weight>
<italics>False</italics> <italics>False</italics>
<line_adjustment>0</line_adjustment> <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> </font>
<display> <display>
<shadow color="#000000" size="5">True</shadow> <shadow color="#000000" size="5">True</shadow>