Commit e0fb0bc1 authored by Dan Pascu's avatar Dan Pascu

Center contact icons

parent 6bd8c873
...@@ -1062,7 +1062,7 @@ class Contact(object): ...@@ -1062,7 +1062,7 @@ class Contact(object):
painter.setRenderHint(QPainter.Antialiasing, True) painter.setRenderHint(QPainter.Antialiasing, True)
painter.setCompositionMode(QPainter.CompositionMode_SourceOver) painter.setCompositionMode(QPainter.CompositionMode_SourceOver)
painter.setClipPath(path) painter.setClipPath(path)
painter.drawPixmap(0, 0, self.icon.pixmap(size)) self.icon.paint(painter, pixmap.rect(), Qt.AlignCenter)
painter.end() painter.end()
else: else:
pixmap = self.icon.pixmap(size) pixmap = self.icon.pixmap(size)
...@@ -1202,7 +1202,7 @@ class ContactDetail(object): ...@@ -1202,7 +1202,7 @@ class ContactDetail(object):
painter.setRenderHint(QPainter.Antialiasing, True) painter.setRenderHint(QPainter.Antialiasing, True)
painter.setCompositionMode(QPainter.CompositionMode_SourceOver) painter.setCompositionMode(QPainter.CompositionMode_SourceOver)
painter.setClipPath(path) painter.setClipPath(path)
painter.drawPixmap(0, 0, self.icon.pixmap(size)) self.icon.paint(painter, pixmap.rect(), Qt.AlignCenter)
painter.end() painter.end()
else: else:
pixmap = self.icon.pixmap(size) pixmap = self.icon.pixmap(size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment