forked from openlp/openlp
More fixes
This commit is contained in:
parent
3e2e87bb2c
commit
632e2ce2dd
@ -245,14 +245,14 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
pixmap = QtGui.QPixmap(width, height)
|
pixmap = QtGui.QPixmap(width, height)
|
||||||
pixmap.fill(QtCore.Qt.white)
|
pixmap.fill(QtCore.Qt.white)
|
||||||
paint = QtGui.QPainter(pixmap)
|
paint = QtGui.QPainter(pixmap)
|
||||||
paint.setPen(QtCore.Qt.blue)
|
paint.setPen(QtGui.QPen(QtCore.Qt.blue))
|
||||||
if not self.theme.font_main_override:
|
if not self.theme.font_main_override:
|
||||||
main_rect = QtCore.QRect(10, 0, width - 20, footer_start)
|
main_rect = QtCore.QRect(10, 0, width - 20, footer_start)
|
||||||
else:
|
else:
|
||||||
main_rect = QtCore.QRect(self.theme.font_main_x, self.theme.font_main_y,
|
main_rect = QtCore.QRect(self.theme.font_main_x, self.theme.font_main_y,
|
||||||
self.theme.font_main_width - 1, self.theme.font_main_height - 1)
|
self.theme.font_main_width - 1, self.theme.font_main_height - 1)
|
||||||
paint.drawRect(main_rect)
|
paint.drawRect(main_rect)
|
||||||
paint.setPen(QtCore.Qt.red)
|
paint.setPen(QtGui.QPen(QtCore.Qt.red))
|
||||||
if not self.theme.font_footer_override:
|
if not self.theme.font_footer_override:
|
||||||
footer_rect = QtCore.QRect(10, footer_start, width - 20,
|
footer_rect = QtCore.QRect(10, footer_start, width - 20,
|
||||||
height - footer_start)
|
height - footer_start)
|
||||||
@ -260,12 +260,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
footer_rect = QtCore.QRect(self.theme.font_footer_x,
|
footer_rect = QtCore.QRect(self.theme.font_footer_x,
|
||||||
self.theme.font_footer_y, self.theme.font_footer_width - 1,
|
self.theme.font_footer_y, self.theme.font_footer_width - 1,
|
||||||
self.theme.font_footer_height - 1)
|
self.theme.font_footer_height - 1)
|
||||||
print footer_rect
|
|
||||||
paint.drawRect(footer_rect)
|
paint.drawRect(footer_rect)
|
||||||
paint.end()
|
paint.end()
|
||||||
pixmap = pixmap.scaled(100, 100 *
|
pixmap = pixmap.scaledToWidth(100, QtCore.Qt.SmoothTransformation)
|
||||||
self.thememanager.mainwindow.renderer.screen_ratio,
|
|
||||||
QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
|
||||||
self.themeLayoutLabel.setPixmap(pixmap)
|
self.themeLayoutLabel.setPixmap(pixmap)
|
||||||
self.displayAspectRatio = float(pixmap.width()) / pixmap.height()
|
self.displayAspectRatio = float(pixmap.width()) / pixmap.height()
|
||||||
self.resizeEvent()
|
self.resizeEvent()
|
||||||
@ -303,6 +300,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
"""
|
"""
|
||||||
if self.updateThemeAllowed:
|
if self.updateThemeAllowed:
|
||||||
self.theme.font_main_override = not (value == QtCore.Qt.Checked)
|
self.theme.font_main_override = not (value == QtCore.Qt.Checked)
|
||||||
|
self._generate_layout()
|
||||||
|
|
||||||
def onFooterPositionCheckBoxStateChanged(self, value):
|
def onFooterPositionCheckBoxStateChanged(self, value):
|
||||||
"""
|
"""
|
||||||
@ -311,6 +309,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
"""
|
"""
|
||||||
if self.updateThemeAllowed:
|
if self.updateThemeAllowed:
|
||||||
self.theme.font_footer_override = not (value == QtCore.Qt.Checked)
|
self.theme.font_footer_override = not (value == QtCore.Qt.Checked)
|
||||||
|
self._generate_layout()
|
||||||
|
|
||||||
def exec_(self, edit=False):
|
def exec_(self, edit=False):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user