diff --git a/openlp/core/lib/themexmlhandler.py b/openlp/core/lib/themexmlhandler.py index ea7ffb2df..12ac0754b 100644 --- a/openlp/core/lib/themexmlhandler.py +++ b/openlp/core/lib/themexmlhandler.py @@ -89,7 +89,7 @@ class ThemeXML(): color.appendChild(bkc) background.appendChild(color) - def add_font(self, fontname, fontcolor, fontproportion, fonttype=u'main'): + def add_font(self, fontname, fontcolor, fontproportion, override, fonttype=u'main', xpos=0, ypos=0 ,width=0, height=0): background = self.theme_xml.createElement(u'font') background.setAttribute(u'type',fonttype) self.theme.appendChild(background) @@ -109,6 +109,15 @@ class ThemeXML(): name.appendChild(fn) background.appendChild(name) + name = self.theme_xml.createElement(u'location') + name.setAttribute(u'override',override) + if override == u'True': + name.setAttribute(u'x',str(xpos)) + name.setAttribute(u'y',str(ypos)) + name.setAttribute(u'width',str(width)) + name.setAttribute(u'height',str(height)) + background.appendChild(name) + def add_display(self, shadow, shadowColor, outline, outlineColor, horizontal, vertical, wrap): background = self.theme_xml.createElement(u'display') self.theme.appendChild(background) diff --git a/openlp/core/render.py b/openlp/core/render.py index cccb11c00..fc580af08 100644 --- a/openlp/core/render.py +++ b/openlp/core/render.py @@ -248,15 +248,17 @@ class Renderer: #log.debug(u'_render_lines %s', lines) bbox=self._render_lines_unaligned(lines, False) # Main font - bbox1=self._render_lines_unaligned(lines, True) # Footer Font + if lines1 is not None: + bbox1=self._render_lines_unaligned(lines1, True) # Footer Font # put stuff on background so need to reset before doing the job properly. self._render_background() x, y = self._correctAlignment(self._rect, bbox) bbox=self._render_lines_unaligned(lines, False, (x,y)) - x, y = self._correctAlignment(self._rect_footer, bbox1) - bbox=self._render_lines_unaligned(lines1, True, (x,y) ) + if lines1 is not None: + x, y = self._correctAlignment(self._rect_footer, bbox1) + bbox=self._render_lines_unaligned(lines1, True, (x,y) ) log.debug(u'render lines DONE') diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index 9e6bad4ac..7e67bf19d 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -31,6 +31,7 @@ class GeneralTab(SettingsTab): def __init__(self, screen_list): SettingsTab.__init__(self, translate(u'GeneralTab', u'General')) self.screen_list = screen_list + print screen_list def setupUi(self): self.setObjectName(u'GeneralTab')