Proper fix for 1102

This commit is contained in:
Tim Bentley 2010-10-29 07:36:17 +01:00
parent fff4cf1e1c
commit 9ed0ff2ea2
2 changed files with 4 additions and 2 deletions

View File

@ -263,9 +263,8 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
# and move it to the centre of the preview space
new_image = QtGui.QImage(width, height,
QtGui.QImage.Format_ARGB32_Premultiplied)
new_image.fill(background)
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)
return new_image

View File

@ -408,6 +408,9 @@ class ThemeXML(object):
elif field in integer_list:
setattr(self, master + field, int(value))
else:
# None means an empty sting so lets have one.
if value == u'None':
value = u''
setattr(self, master + field, unicode(value))
def __str__(self):