From 2c4301e4f0949d696279a49598163d44c3292f03 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sun, 20 Nov 2016 14:12:27 +0300 Subject: [PATCH] bug fixes --- toxygen/mainscreen.py | 9 +++++++-- toxygen/util.py | 2 +- toxygen/widgets.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/toxygen/mainscreen.py b/toxygen/mainscreen.py index 8d7f937..336ba9d 100644 --- a/toxygen/mainscreen.py +++ b/toxygen/mainscreen.py @@ -5,6 +5,7 @@ from widgets import MultilineEdit, LineEdit, ComboBox import plugin_support from mainscreen_widgets import * import settings +import platform class MainWindow(QtGui.QMainWindow, Singleton): @@ -374,8 +375,12 @@ class MainWindow(QtGui.QMainWindow, Singleton): self.close() def resizeEvent(self, *args, **kwargs): - self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 159) - self.friends_list.setGeometry(0, 0, 270, self.height() - 129) + if platform.system() == 'Windows': + self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 155) + self.friends_list.setGeometry(0, 0, 270, self.height() - 125) + else: + self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 159) + self.friends_list.setGeometry(0, 0, 270, self.height() - 129) self.videocallButton.setGeometry(QtCore.QRect(self.width() - 330, 10, 50, 50)) self.callButton.setGeometry(QtCore.QRect(self.width() - 390, 10, 50, 50)) diff --git a/toxygen/util.py b/toxygen/util.py index c8cd6f4..d532f70 100644 --- a/toxygen/util.py +++ b/toxygen/util.py @@ -3,7 +3,7 @@ import time import shutil import sys -program_version = '0.2.6' +program_version = '0.2.7' def log(data): diff --git a/toxygen/widgets.py b/toxygen/widgets.py index ae4eb70..f83e02c 100644 --- a/toxygen/widgets.py +++ b/toxygen/widgets.py @@ -9,7 +9,7 @@ class DataLabel(QtGui.QLabel): Label with elided text """ def setText(self, text): - text = ''.join(c if c <= '\U0010FFFF' else '\u25AF' for c in text) + text = ''.join('\u25AF' if len(bytes(c, 'utf-8')) >= 4 else c for c in text) metrics = QtGui.QFontMetrics(self.font()) text = metrics.elidedText(text, QtCore.Qt.ElideRight, self.width()) super().setText(text)