Commit c93cf7c8 authored by Adrian Georgescu's avatar Adrian Georgescu

Fixed saving local icon

parent 1d502682
...@@ -160,9 +160,9 @@ class IconManager(object, metaclass=Singleton): ...@@ -160,9 +160,9 @@ class IconManager(object, metaclass=Singleton):
pixmap = pixmap.scaled(self.max_size, self.max_size, Qt.KeepAspectRatio, Qt.SmoothTransformation) pixmap = pixmap.scaled(self.max_size, self.max_size, Qt.KeepAspectRatio, Qt.SmoothTransformation)
buffer = QBuffer() buffer = QBuffer()
pixmap.save(buffer, 'png') pixmap.save(buffer, 'png')
data = str(buffer.data()) data = buffer.data()
with open(filename, 'wb') as f: with open(filename, 'wb') as f:
f.write(data.encode()) f.write(data)
icon = QIcon(pixmap) icon = QIcon(pixmap)
icon.filename = filename icon.filename = filename
icon.content = data icon.content = data
......
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