From 81f0ff3870b64bef4ddfc9fcc7264fbea94153ea Mon Sep 17 00:00:00 2001 From: Edwin Lunando Date: Fri, 18 May 2012 17:38:05 +0700 Subject: [PATCH] #902492 resolved. All the working code is a placed at theme.py. --- openlp/core/lib/theme.py | 13 ++++++------- openlp/core/ui/thememanager.py | 5 +---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 16ee1be37..afc217e79 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -444,16 +444,15 @@ class ThemeXML(object): element.appendChild(child) return child - def set_default_header_footer(self, main_width, main_height, footer_width, - footer_height): + def set_default_header_footer(self, current_screen): """ Set the header and footer size into the current primary screen """ - self.font_main_width = main_width - self.font_main_height = main_height - self.font_footer_width = footer_width - self.font_footer_y = main_height+20 - self.font_footer_height = footer_height + self.font_main_width = current_screen[u'size'].width()-20 + self.font_main_height = current_screen[u'size'].height()-100 + self.font_footer_width = current_screen[u'size'].width()-20 + self.font_footer_y = current_screen[u'size'].height()-80 + self.font_footer_height = 70 def dump_xml(self): """ diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 4766e0693..38d568883 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -256,10 +256,7 @@ class ThemeManager(QtGui.QWidget): """ theme = ThemeXML() screens = ScreenList.get_instance() - primary_screen = screens.current - theme.set_default_header_footer(primary_screen[u'size'].width()-20, - primary_screen[u'size'].height() - 100, - primary_screen[u'size'].width()-20, 70) + theme.set_default_header_footer(screens.current) self.themeForm.theme = theme self.themeForm.exec_()