diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index a5dcf881f..686de4c6c 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -444,6 +444,20 @@ class ThemeXML(object): element.appendChild(child) return child + def set_default_header_footer(self): + """ + Set the header and footer size into the current primary screen. + 10 px on each side is removed to allow for a border. + """ + from openlp.core.ui import ScreenList + current_screen = ScreenList().current + self.font_main_y = 0 + self.font_main_width = current_screen[u'size'].width() - 20 + self.font_main_height = current_screen[u'size'].height() * 9 / 10 + self.font_footer_width = current_screen[u'size'].width() - 20 + self.font_footer_y = current_screen[u'size'].height() * 9 / 10 + self.font_footer_height = current_screen[u'size'].height() / 10 + def dump_xml(self): """ Dump the XML to file used for debugging diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 665c435b9..ea18379e2 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -257,6 +257,7 @@ class ThemeManager(QtGui.QWidget): editing form for the user to make their customisations. """ theme = ThemeXML() + theme.set_default_header_footer() self.themeForm.theme = theme self.themeForm.exec_()