incoming inline fix
This commit is contained in:
parent
2ed4e00d3e
commit
60df9f7b1d
3 changed files with 3 additions and 3 deletions
|
@ -302,7 +302,7 @@ class InlineImageItem(QtGui.QWidget):
|
||||||
self._image_label.setScaledContents(False)
|
self._image_label.setScaledContents(False)
|
||||||
self.pixmap = QtGui.QPixmap()
|
self.pixmap = QtGui.QPixmap()
|
||||||
self.pixmap.loadFromData(QtCore.QByteArray(data), "PNG")
|
self.pixmap.loadFromData(QtCore.QByteArray(data), "PNG")
|
||||||
max_size = width - 50
|
max_size = width - 40
|
||||||
if self.pixmap.width() <= max_size:
|
if self.pixmap.width() <= max_size:
|
||||||
self._image_label.setPixmap(self.pixmap)
|
self._image_label.setPixmap(self.pixmap)
|
||||||
self.resize(QtCore.QSize(max_size, self.pixmap.height()))
|
self.resize(QtCore.QSize(max_size, self.pixmap.height()))
|
||||||
|
|
|
@ -345,7 +345,7 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
msgBox = QtGui.QMessageBox()
|
msgBox = QtGui.QMessageBox()
|
||||||
msgBox.setWindowTitle(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
|
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))
|
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_()
|
msgBox.exec_()
|
||||||
|
|
||||||
def network_settings(self):
|
def network_settings(self):
|
||||||
|
|
|
@ -1052,7 +1052,7 @@ class Profile(Contact, Singleton):
|
||||||
inline)
|
inline)
|
||||||
if friend_number == self.get_active_number():
|
if friend_number == self.get_active_number():
|
||||||
count = self._messages.count()
|
count = self._messages.count()
|
||||||
item = InlineImageItem(transfer.get_data())
|
item = InlineImageItem(transfer.get_data(), self._messages.width())
|
||||||
elem = QtGui.QListWidgetItem()
|
elem = QtGui.QListWidgetItem()
|
||||||
elem.setSizeHint(QtCore.QSize(600, item.height()))
|
elem.setSizeHint(QtCore.QSize(600, item.height()))
|
||||||
self._messages.insertItem(count + i + 1, elem)
|
self._messages.insertItem(count + i + 1, elem)
|
||||||
|
|
Loading…
Reference in a new issue