openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #15627
[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)
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/106121
I've resolved the bug #902492
I got the primary screen resolution from the ScreenList class.
--
https://code.launchpad.net/~edwinlunando/openlp/bug-902492/+merge/106121
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-17 08:34:34 +0000
@@ -444,6 +444,17 @@
element.appendChild(child)
return child
+ def set_default_header_footer(self, main_width, main_height, footer_width,
+ footer_height):
+ """
+ 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
+
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-17 08:34:34 +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,11 @@
editing form for the user to make their customisations.
"""
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)
self.themeForm.theme = theme
self.themeForm.exec_()
Follow ups