From 60df9f7b1dd9cc6d26c8fe6153bbb824743dd9a8 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 11 May 2016 21:55:36 +0300 Subject: [PATCH] incoming inline fix --- src/list_items.py | 2 +- src/mainscreen.py | 2 +- src/profile.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/list_items.py b/src/list_items.py index 3077d88..697ea66 100644 --- a/src/list_items.py +++ b/src/list_items.py @@ -302,7 +302,7 @@ class InlineImageItem(QtGui.QWidget): self._image_label.setScaledContents(False) self.pixmap = QtGui.QPixmap() self.pixmap.loadFromData(QtCore.QByteArray(data), "PNG") - max_size = width - 50 + max_size = width - 40 if self.pixmap.width() <= max_size: self._image_label.setPixmap(self.pixmap) self.resize(QtCore.QSize(max_size, self.pixmap.height())) diff --git a/src/mainscreen.py b/src/mainscreen.py index cf7f545..246c725 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -345,7 +345,7 @@ class MainWindow(QtGui.QMainWindow): msgBox = QtGui.QMessageBox() msgBox.setWindowTitle(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8)) text = (QtGui.QApplication.translate("MainWindow", 'Toxygen is Tox client written on Python.\nVersion: ', None, QtGui.QApplication.UnicodeUTF8)) - msgBox.setText(text + util.program_version + '\nGitHub: github.com/xveduk/toxygen') + msgBox.setText(text + util.program_version + '\nGitHub: github.com/xveduk/toxygen/') msgBox.exec_() def network_settings(self): diff --git a/src/profile.py b/src/profile.py index 48e70e1..661b485 100644 --- a/src/profile.py +++ b/src/profile.py @@ -1052,7 +1052,7 @@ class Profile(Contact, Singleton): inline) if friend_number == self.get_active_number(): count = self._messages.count() - item = InlineImageItem(transfer.get_data()) + item = InlineImageItem(transfer.get_data(), self._messages.width()) elem = QtGui.QListWidgetItem() elem.setSizeHint(QtCore.QSize(600, item.height())) self._messages.insertItem(count + i + 1, elem)