forked from openlp/openlp
updated the set_default_header_footer method on lib/theme.py
all the works and the import is inside the method.
This commit is contained in:
parent
41d1ea3590
commit
fb8519694e
@ -36,6 +36,7 @@ from lxml import etree, objectify
|
||||
|
||||
from openlp.core.lib import str_to_bool
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
BLANK_THEME_XML = \
|
||||
@ -444,12 +445,14 @@ class ThemeXML(object):
|
||||
element.appendChild(child)
|
||||
return child
|
||||
|
||||
def set_default_header_footer(self, current_screen):
|
||||
def set_default_header_footer(self):
|
||||
"""
|
||||
Set the header and footer size into the current primary screen
|
||||
"""
|
||||
#10 px border set round display
|
||||
self.font_main_y = 0;
|
||||
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
|
||||
|
@ -43,7 +43,7 @@ from openlp.core.lib.theme import ThemeXML, BackgroundType, VerticalType, \
|
||||
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, ScreenList
|
||||
from openlp.core.ui import FileRenameForm, ThemeForm
|
||||
from openlp.core.utils import AppLocation, delete_file, get_filesystem_encoding
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -255,7 +255,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
editing form for the user to make their customisations.
|
||||
"""
|
||||
theme = ThemeXML()
|
||||
theme.set_default_header_footer(ScreenList.get_instance().current)
|
||||
theme.set_default_header_footer()
|
||||
self.themeForm.theme = theme
|
||||
self.themeForm.exec_()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user