This commit is contained in:
Samuel Findlay 2012-06-03 23:53:20 +10:00
commit 501107c840
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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_()