bug fixes

This commit is contained in:
ingvar1995 2016-11-20 14:12:27 +03:00
parent dc6ec7a6e8
commit 2c4301e4f0
3 changed files with 9 additions and 4 deletions

View File

@ -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))

View File

@ -3,7 +3,7 @@ import time
import shutil
import sys
program_version = '0.2.6'
program_version = '0.2.7'
def log(data):

View File

@ -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)