forked from openlp/openlp
Proper fix for 1102
This commit is contained in:
parent
fff4cf1e1c
commit
9ed0ff2ea2
@ -263,9 +263,8 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
|
|||||||
# and move it to the centre of the preview space
|
# and move it to the centre of the preview space
|
||||||
new_image = QtGui.QImage(width, height,
|
new_image = QtGui.QImage(width, height,
|
||||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||||
new_image.fill(background)
|
|
||||||
painter = QtGui.QPainter(new_image)
|
painter = QtGui.QPainter(new_image)
|
||||||
#painter.fillRect(new_image.rect(), background)
|
painter.fillRect(new_image.rect(), background)
|
||||||
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
||||||
return new_image
|
return new_image
|
||||||
|
|
||||||
|
@ -408,6 +408,9 @@ class ThemeXML(object):
|
|||||||
elif field in integer_list:
|
elif field in integer_list:
|
||||||
setattr(self, master + field, int(value))
|
setattr(self, master + field, int(value))
|
||||||
else:
|
else:
|
||||||
|
# None means an empty sting so lets have one.
|
||||||
|
if value == u'None':
|
||||||
|
value = u''
|
||||||
setattr(self, master + field, unicode(value))
|
setattr(self, master + field, unicode(value))
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user