From 4fb08864529f536d162a41e5f2022922374c74fc Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Fri, 26 Feb 2016 23:14:22 +0300 Subject: [PATCH] ui update --- src/mainscreen.py | 10 +++------- src/notifications.py | 2 +- src/profile.py | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/mainscreen.py b/src/mainscreen.py index d6b627b..81173b0 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -12,7 +12,6 @@ class MessageItem(QtGui.QListWidget): def __init__(self, text, time, user='', parent=None): QtGui.QListWidget.__init__(self, parent) - self.setBaseSize(QtCore.QSize(250, 250)) self.name = QtGui.QLabel(self) self.name.setGeometry(QtCore.QRect(0, 0, 50, 25)) font = QtGui.QFont() @@ -24,7 +23,7 @@ class MessageItem(QtGui.QListWidget): self.name.setText(user) self.time = QtGui.QLabel(self) - self.time.setGeometry(QtCore.QRect(250, 0, 30, 20)) + self.time.setGeometry(QtCore.QRect(450, 0, 50, 50)) font = QtGui.QFont() font.setFamily("Times New Roman") font.setPointSize(10) @@ -34,6 +33,7 @@ class MessageItem(QtGui.QListWidget): self.time.setText(time) self.message = QtGui.QPlainTextEdit(self) + self.message.setGeometry(QtCore.QRect(50, 0, 400, 50)) self.message.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse | QtCore.Qt.LinksAccessibleByMouse) self.message.setPlainText(text) @@ -263,10 +263,6 @@ class MainWindow(QtGui.QMainWindow): QtCore.QMetaObject.connectSlotsByName(Form) def setup_left_center(self, widget, profile_widget): - # widget.setFixedWidth(250) - # widget.setMinimumSize(QtCore.QSize(250, 500)) - # widget.setMaximumSize(QtCore.QSize(250, 500)) - # widget.setBaseSize(QtCore.QSize(250, 500)) self.friends_list = QtGui.QListWidget(widget) self.friends_list.setGeometry(0, 0, 250, 300) count = self.tox.self_get_friend_list_size() @@ -284,7 +280,7 @@ class MainWindow(QtGui.QMainWindow): def setup_right_center(self, widget): self.messages = QtGui.QListWidget(widget) - self.messages.setGeometry(0, 0, 250, 300) + self.messages.setGeometry(0, 0, 500, 500) def initUI(self): self.setMinimumSize(800, 400) diff --git a/src/notifications.py b/src/notifications.py index 57fc395..af29fed 100644 --- a/src/notifications.py +++ b/src/notifications.py @@ -1,7 +1,7 @@ from PySide import QtGui from util import curr_directory # TODO: add sound notifications -# TODO: add reaction om mouse move +# TODO: make app icon active def tray_notification(title, text): diff --git a/src/profile.py b/src/profile.py index 1ab96bd..c71086f 100644 --- a/src/profile.py +++ b/src/profile.py @@ -170,7 +170,7 @@ class Profile(Contact): item = mainscreen.MessageItem(message, curr_time(), user_name) elem = QtGui.QListWidgetItem(self._messages) print item.sizeHint() - elem.setSizeHint(QtCore.QSize(250, 50)) + elem.setSizeHint(QtCore.QSize(500, 100)) self._messages.addItem(elem) self._messages.setItemWidget(elem, item) self._messages.repaint()