From 335d646c4240734c37d71384a3ddf14c086eeebe Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sun, 9 Jul 2017 17:22:37 +0300 Subject: [PATCH] avatars fix --- toxygen/menu.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toxygen/menu.py b/toxygen/menu.py index bd4e98c..c0ad290 100644 --- a/toxygen/menu.py +++ b/toxygen/menu.py @@ -248,11 +248,11 @@ class ProfileSettings(CenteredWidget): def set_avatar(self): choose = QtWidgets.QApplication.translate("ProfileSettingsForm", "Choose avatar") name = QtWidgets.QFileDialog.getOpenFileName(self, choose, None, 'Images (*.png)', - QtGui.QComboBoxQtWidgets.QFileDialog.DontUseNativeDialog) + options=QtWidgets.QFileDialog.DontUseNativeDialog) if name[0]: bitmap = QtGui.QPixmap(name[0]) - bitmap.scaled(QtCore.QSize(128, 128), aspectMode=QtCore.Qt.KeepAspectRatio, - mode=QtCore.Qt.SmoothTransformation) + bitmap.scaled(QtCore.QSize(128, 128), aspectRatioMode=QtCore.Qt.KeepAspectRatio, + transformMode=QtCore.Qt.SmoothTransformation) byte_array = QtCore.QByteArray() buffer = QtCore.QBuffer(byte_array) @@ -262,13 +262,13 @@ class ProfileSettings(CenteredWidget): def export_profile(self): directory = QtWidgets.QFileDialog.getExistingDirectory(options=QtWidgets.QFileDialog.DontUseNativeDialog, - dir=curr_directory()) + '/' + dir=curr_directory()) + '/' if directory != '/': reply = QtWidgets.QMessageBox.question(None, QtWidgets.QApplication.translate("ProfileSettingsForm", - 'Use new path'), + 'Use new path'), QtWidgets.QApplication.translate("ProfileSettingsForm", - 'Do you want to move your profile to this location?'), + 'Do you want to move your profile to this location?'), QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No) settings = Settings.get_instance()