forked from openlp/openlp
themeform.py line 426 at function setPositionPageValues(self):
added main and footer page width and height based on the screen size
This commit is contained in:
parent
6f361ad018
commit
49dbda7476
|
@ -427,25 +427,28 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||||
"""
|
"""
|
||||||
Handle the display and state of the Position page.
|
Handle the display and state of the Position page.
|
||||||
"""
|
"""
|
||||||
|
# Get the QRect of a screen
|
||||||
|
screen = QtGui.QDesktopWidget().availableGeometry()
|
||||||
# Main Area
|
# Main Area
|
||||||
self.mainPositionCheckBox.setChecked(not self.theme.font_main_override)
|
self.mainPositionCheckBox.setChecked(not self.theme.font_main_override)
|
||||||
self.setField(u'mainPositionX', QtCore.QVariant(self.theme.font_main_x))
|
self.setField(u'mainPositionX', QtCore.QVariant(self.theme.font_main_x))
|
||||||
self.setField(u'mainPositionY', QtCore.QVariant(self.theme.font_main_y))
|
self.setField(u'mainPositionY', QtCore.QVariant(self.theme.font_main_y))
|
||||||
self.setField(u'mainPositionHeight',
|
self.setField(u'mainPositionHeight',
|
||||||
QtCore.QVariant(self.theme.font_main_height))
|
QtCore.QVariant(screen.height() - 110))
|
||||||
self.setField(u'mainPositionWidth',
|
self.setField(u'mainPositionWidth',
|
||||||
QtCore.QVariant(self.theme.font_main_width))
|
QtCore.QVariant(screen.width() - 20))
|
||||||
# Footer
|
# Footer
|
||||||
self.footerPositionCheckBox.setChecked(
|
self.footerPositionCheckBox.setChecked(
|
||||||
not self.theme.font_footer_override)
|
not self.theme.font_footer_override)
|
||||||
self.setField(u'footerPositionX',
|
self.setField(u'footerPositionX',
|
||||||
QtCore.QVariant(self.theme.font_footer_x))
|
QtCore.QVariant(self.theme.font_footer_x))
|
||||||
self.setField(u'footerPositionY',
|
self.setField(u'footerPositionY',
|
||||||
QtCore.QVariant(self.theme.font_footer_y))
|
QtCore.QVariant(screen.height() - 100))
|
||||||
self.setField(u'footerPositionHeight',
|
self.setField(u'footerPositionHeight',
|
||||||
QtCore.QVariant(self.theme.font_footer_height))
|
QtCore.QVariant(120))
|
||||||
|
|
||||||
self.setField(u'footerPositionWidth',
|
self.setField(u'footerPositionWidth',
|
||||||
QtCore.QVariant(self.theme.font_footer_width))
|
QtCore.QVariant(screen.width() - 20))
|
||||||
|
|
||||||
def setAlignmentPageValues(self):
|
def setAlignmentPageValues(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue