← 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:
  Tim Bentley (trb143)
  Jonathan Corwin (j-corwin)
  Andreas Preikschat (googol)
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/107548

merged with trunk.
-- 
https://code.launchpad.net/~edwinlunando/openlp/bug-902492/+merge/107548
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-27 10:09:20 +0000
@@ -444,6 +444,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().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-27 10:09:20 +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