← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~edwinlunando/openlp/bug-902492 into lp:openlp

 

Edwin Lunando has proposed merging lp:~edwinlunando/openlp/bug-902492 into lp:openlp.

Requested reviews:
  Jonathan Corwin (j-corwin)
  Andreas Preikschat (googol)
  Tim Bentley (trb143)
Related bugs:
  Bug #902492 in OpenLP: "Theme Wizard does not use the live screen's size as default when overwriting "Output Area Locations" "
  https://bugs.launchpad.net/openlp/+bug/902492

For more details, see:
https://code.launchpad.net/~edwinlunando/openlp/bug-902492/+merge/106532

updated the set_default_header_footer method on lib/theme.py
all the works and the import is inside the method.
-- 
https://code.launchpad.net/~edwinlunando/openlp/bug-902492/+merge/106532
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py	2012-04-03 17:58:42 +0000
+++ openlp/core/lib/theme.py	2012-05-20 14:26:25 +0000
@@ -36,6 +36,7 @@
 
 from openlp.core.lib import str_to_bool
 
+
 log = logging.getLogger(__name__)
 
 BLANK_THEME_XML = \
@@ -444,6 +445,20 @@
         element.appendChild(child)
         return child
 
+    def set_default_header_footer(self):
+        """
+        Set the header and footer size into the current primary screen
+        """
+        #10 px border set round display
+        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
+        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

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2012-04-29 15:31:56 +0000
+++ openlp/core/ui/thememanager.py	2012-05-20 14:26:25 +0000
@@ -257,6 +257,7 @@
         editing form for the user to make their customisations.
         """
         theme = ThemeXML()
+        theme.set_default_header_footer()
         self.themeForm.theme = theme
         self.themeForm.exec_()
 


Follow ups