This commit is contained in:
ingvar1995 2016-05-12 20:45:01 +03:00
parent 4d1addfa63
commit 91b558775a
2 changed files with 2 additions and 0 deletions

View File

@ -277,6 +277,7 @@ class MainWindow(QtGui.QMainWindow):
self.setMinimumSize(920, 500) self.setMinimumSize(920, 500)
self.setGeometry(400, 400, 920, 500) self.setGeometry(400, 400, 920, 500)
self.setWindowTitle('Toxygen') self.setWindowTitle('Toxygen')
os.chdir(curr_directory() + '/images/')
main = QtGui.QWidget() main = QtGui.QWidget()
grid = QtGui.QGridLayout() grid = QtGui.QGridLayout()
search = QtGui.QWidget() search = QtGui.QWidget()

View File

@ -444,6 +444,7 @@ class Profile(Contact, Singleton):
avatar_path = (ProfileHelper.get_path() + 'avatars/{}.png').format(friend.tox_id[:TOX_PUBLIC_KEY_SIZE * 2]) avatar_path = (ProfileHelper.get_path() + 'avatars/{}.png').format(friend.tox_id[:TOX_PUBLIC_KEY_SIZE * 2])
if not os.path.isfile(avatar_path): # load default image if not os.path.isfile(avatar_path): # load default image
avatar_path = curr_directory() + '/images/avatar.png' avatar_path = curr_directory() + '/images/avatar.png'
os.chdir(os.path.dirname(avatar_path))
pixmap = QtGui.QPixmap(QtCore.QSize(64, 64)) pixmap = QtGui.QPixmap(QtCore.QSize(64, 64))
pixmap.load(avatar_path) pixmap.load(avatar_path)
self._screen.account_avatar.setScaledContents(False) self._screen.account_avatar.setScaledContents(False)