forked from openlp/openlp
#902492 resolved. All the working code is a placed at theme.py.
This commit is contained in:
parent
a251522ef3
commit
81f0ff3870
@ -444,16 +444,15 @@ class ThemeXML(object):
|
|||||||
element.appendChild(child)
|
element.appendChild(child)
|
||||||
return child
|
return child
|
||||||
|
|
||||||
def set_default_header_footer(self, main_width, main_height, footer_width,
|
def set_default_header_footer(self, current_screen):
|
||||||
footer_height):
|
|
||||||
"""
|
"""
|
||||||
Set the header and footer size into the current primary screen
|
Set the header and footer size into the current primary screen
|
||||||
"""
|
"""
|
||||||
self.font_main_width = main_width
|
self.font_main_width = current_screen[u'size'].width()-20
|
||||||
self.font_main_height = main_height
|
self.font_main_height = current_screen[u'size'].height()-100
|
||||||
self.font_footer_width = footer_width
|
self.font_footer_width = current_screen[u'size'].width()-20
|
||||||
self.font_footer_y = main_height+20
|
self.font_footer_y = current_screen[u'size'].height()-80
|
||||||
self.font_footer_height = footer_height
|
self.font_footer_height = 70
|
||||||
|
|
||||||
def dump_xml(self):
|
def dump_xml(self):
|
||||||
"""
|
"""
|
||||||
|
@ -256,10 +256,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
theme = ThemeXML()
|
theme = ThemeXML()
|
||||||
screens = ScreenList.get_instance()
|
screens = ScreenList.get_instance()
|
||||||
primary_screen = screens.current
|
theme.set_default_header_footer(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.theme = theme
|
||||||
self.themeForm.exec_()
|
self.themeForm.exec_()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user