openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #15649
[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/106351
I've resolved the bug #902492
I got the primary screen resolution from the ScreenList class.
All the working code is at theme.py.
--
https://code.launchpad.net/~edwinlunando/openlp/bug-902492/+merge/106351
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-18 10:51:24 +0000
@@ -444,6 +444,16 @@
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_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):
"""
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-18 10:51:24 +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_()
Follow ups