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

Requested reviews:
  Jonathan Corwin (j-corwin)
  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/106489

I've resolved the bug #902492
Updated math calculation.
-- 
https://code.launchpad.net/~edwinlunando/openlp/bug-902492/+merge/106489
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-19 08:53:19 +0000
@@ -444,6 +444,17 @@
         element.appendChild(child)
         return child
 
+    def set_default_header_footer(self, current_screen):
+        """
+        Set the header and footer size into the current primary screen
+        """
+        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-19 08:53:19 +0000
@@ -43,7 +43,7 @@
 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
+from openlp.core.ui import FileRenameForm, ThemeForm, ScreenList
 from openlp.core.utils import AppLocation, delete_file, get_filesystem_encoding
 
 log = logging.getLogger(__name__)
@@ -257,6 +257,7 @@
         editing form for the user to make their customisations.
         """
         theme = ThemeXML()
+        theme.set_default_header_footer(ScreenList.get_instance().current)
         self.themeForm.theme = theme
         self.themeForm.exec_()
 

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to