#902492 resolved. All the working code is a placed at theme.py.

This commit is contained in:
Edwin Lunando 2012-05-18 17:38:05 +07:00
parent a251522ef3
commit 81f0ff3870
2 changed files with 7 additions and 11 deletions

View File

@ -444,16 +444,15 @@ class ThemeXML(object):
element.appendChild(child)
return child
def set_default_header_footer(self, main_width, main_height, footer_width,
footer_height):
def set_default_header_footer(self, current_screen):
"""
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
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):
"""

View File

@ -256,10 +256,7 @@ class ThemeManager(QtGui.QWidget):
"""
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)
theme.set_default_header_footer(screens.current)
self.themeForm.theme = theme
self.themeForm.exec_()