diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 8b701443a..dc701f6ad 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -36,6 +36,7 @@ from lxml import etree, objectify from openlp.core.lib import str_to_bool + log = logging.getLogger(__name__) BLANK_THEME_XML = \ @@ -444,12 +445,14 @@ class ThemeXML(object): element.appendChild(child) return child - def set_default_header_footer(self, current_screen): + def set_default_header_footer(self): """ Set the header and footer size into the current primary screen """ #10 px border set round display - self.font_main_y = 0; + from openlp.core.ui import ScreenList + current_screen = ScreenList.get_instance().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 diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 18547042b..f2d313fd7 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -43,7 +43,7 @@ from openlp.core.lib.theme import ThemeXML, BackgroundType, VerticalType, \ from openlp.core.lib.ui import UiStrings, critical_error_message_box, \ create_widget_action from openlp.core.theme import Theme -from openlp.core.ui import FileRenameForm, ThemeForm, ScreenList +from openlp.core.ui import FileRenameForm, ThemeForm from openlp.core.utils import AppLocation, delete_file, get_filesystem_encoding log = logging.getLogger(__name__) @@ -255,7 +255,7 @@ class ThemeManager(QtGui.QWidget): editing form for the user to make their customisations. """ theme = ThemeXML() - theme.set_default_header_footer(ScreenList.get_instance().current) + theme.set_default_header_footer() self.themeForm.theme = theme self.themeForm.exec_()