avatars fix
This commit is contained in:
parent
b6f5123495
commit
335d646c42
1 changed files with 6 additions and 6 deletions
|
@ -248,11 +248,11 @@ class ProfileSettings(CenteredWidget):
|
||||||
def set_avatar(self):
|
def set_avatar(self):
|
||||||
choose = QtWidgets.QApplication.translate("ProfileSettingsForm", "Choose avatar")
|
choose = QtWidgets.QApplication.translate("ProfileSettingsForm", "Choose avatar")
|
||||||
name = QtWidgets.QFileDialog.getOpenFileName(self, choose, None, 'Images (*.png)',
|
name = QtWidgets.QFileDialog.getOpenFileName(self, choose, None, 'Images (*.png)',
|
||||||
QtGui.QComboBoxQtWidgets.QFileDialog.DontUseNativeDialog)
|
options=QtWidgets.QFileDialog.DontUseNativeDialog)
|
||||||
if name[0]:
|
if name[0]:
|
||||||
bitmap = QtGui.QPixmap(name[0])
|
bitmap = QtGui.QPixmap(name[0])
|
||||||
bitmap.scaled(QtCore.QSize(128, 128), aspectMode=QtCore.Qt.KeepAspectRatio,
|
bitmap.scaled(QtCore.QSize(128, 128), aspectRatioMode=QtCore.Qt.KeepAspectRatio,
|
||||||
mode=QtCore.Qt.SmoothTransformation)
|
transformMode=QtCore.Qt.SmoothTransformation)
|
||||||
|
|
||||||
byte_array = QtCore.QByteArray()
|
byte_array = QtCore.QByteArray()
|
||||||
buffer = QtCore.QBuffer(byte_array)
|
buffer = QtCore.QBuffer(byte_array)
|
||||||
|
|
Loading…
Reference in a new issue