bug fixes
This commit is contained in:
parent
dc6ec7a6e8
commit
2c4301e4f0
@ -5,6 +5,7 @@ from widgets import MultilineEdit, LineEdit, ComboBox
|
|||||||
import plugin_support
|
import plugin_support
|
||||||
from mainscreen_widgets import *
|
from mainscreen_widgets import *
|
||||||
import settings
|
import settings
|
||||||
|
import platform
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QtGui.QMainWindow, Singleton):
|
class MainWindow(QtGui.QMainWindow, Singleton):
|
||||||
@ -374,6 +375,10 @@ class MainWindow(QtGui.QMainWindow, Singleton):
|
|||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def resizeEvent(self, *args, **kwargs):
|
def resizeEvent(self, *args, **kwargs):
|
||||||
|
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.messages.setGeometry(0, 0, self.width() - 270, self.height() - 159)
|
||||||
self.friends_list.setGeometry(0, 0, 270, self.height() - 129)
|
self.friends_list.setGeometry(0, 0, 270, self.height() - 129)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import time
|
|||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
program_version = '0.2.6'
|
program_version = '0.2.7'
|
||||||
|
|
||||||
|
|
||||||
def log(data):
|
def log(data):
|
||||||
|
@ -9,7 +9,7 @@ class DataLabel(QtGui.QLabel):
|
|||||||
Label with elided text
|
Label with elided text
|
||||||
"""
|
"""
|
||||||
def setText(self, 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())
|
metrics = QtGui.QFontMetrics(self.font())
|
||||||
text = metrics.elidedText(text, QtCore.Qt.ElideRight, self.width())
|
text = metrics.elidedText(text, QtCore.Qt.ElideRight, self.width())
|
||||||
super().setText(text)
|
super().setText(text)
|
||||||
|
Loading…
Reference in New Issue
Block a user