ui update

This commit is contained in:
ingvar1995 2016-03-30 20:33:42 +03:00
parent 721ac2b807
commit 9696615caf
5 changed files with 31 additions and 30 deletions

View file

@ -126,13 +126,13 @@ class MainWindow(QtGui.QMainWindow):
def setup_left_bottom(self, Form):
Form.setObjectName("left_bottom")
Form.resize(500, 80)
Form.resize(500, 60)
self.online_contacts = QtGui.QCheckBox(Form)
self.online_contacts.setGeometry(QtCore.QRect(0, 20, 141, 22))
self.online_contacts.setGeometry(QtCore.QRect(0, 0, 140, 20))
self.online_contacts.setObjectName("online_contacts")
self.online_contacts.clicked.connect(self.filtering)
self.contact_name = QtGui.QLineEdit(Form)
self.contact_name.setGeometry(QtCore.QRect(0, 40, 140, 28))
self.contact_name.setGeometry(QtCore.QRect(0, 27, 270, 30))
self.contact_name.setObjectName("contact_name")
self.contact_name.textChanged.connect(self.filtering)
self.online_contacts.setText(QtGui.QApplication.translate("Form", "Online contacts", None, QtGui.QApplication.UnicodeUTF8))
@ -149,7 +149,7 @@ class MainWindow(QtGui.QMainWindow):
self.avatar_label.setGeometry(QtCore.QRect(10, 20, 64, 64))
self.avatar_label.setScaledContents(True)
self.name = Form.name = QtGui.QLabel(Form)
Form.name.setGeometry(QtCore.QRect(80, 30, 120, 25))
Form.name.setGeometry(QtCore.QRect(80, 30, 150, 25))
font = QtGui.QFont()
font.setFamily("Times New Roman")
font.setPointSize(14)
@ -163,7 +163,7 @@ class MainWindow(QtGui.QMainWindow):
Form.status_message.setFont(font)
Form.status_message.setObjectName("status_message")
self.connection_status = Form.connection_status = StatusCircle(self)
Form.connection_status.setGeometry(QtCore.QRect(200, 34, 64, 64))
Form.connection_status.setGeometry(QtCore.QRect(230, 34, 64, 64))
Form.connection_status.setMinimumSize(QtCore.QSize(32, 32))
Form.connection_status.setMaximumSize(QtCore.QSize(32, 32))
Form.connection_status.setBaseSize(QtCore.QSize(32, 32))
@ -205,7 +205,7 @@ class MainWindow(QtGui.QMainWindow):
def setup_left_center(self, widget):
self.friends_list = QtGui.QListWidget(widget)
self.friends_list.setObjectName("friends_list")
self.friends_list.setGeometry(0, 0, 270, 250)
self.friends_list.setGeometry(0, 0, 270, 310)
self.friends_list.clicked.connect(self.friend_click)
self.friends_list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.friends_list.connect(self.friends_list, QtCore.SIGNAL("customContextMenuRequested(QPoint)"),
@ -225,15 +225,15 @@ class MainWindow(QtGui.QMainWindow):
self.messages.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
def initUI(self, tox):
self.setMinimumSize(920, 520)
self.setMaximumSize(920, 520)
self.setGeometry(400, 400, 920, 520)
self.setMinimumSize(920, 500)
self.setMaximumSize(920, 500)
self.setGeometry(400, 400, 920, 500)
self.setWindowTitle('Toxygen')
main = QtGui.QWidget()
grid = QtGui.QGridLayout()
search = QtGui.QWidget()
self.setup_left_bottom(search)
grid.addWidget(search, 2, 0)
grid.addWidget(search, 3, 0)
name = QtGui.QWidget()
self.setup_left_top(name)
grid.addWidget(name, 0, 0)
@ -245,13 +245,14 @@ class MainWindow(QtGui.QMainWindow):
grid.addWidget(info, 0, 1)
message_buttons = QtGui.QWidget()
self.setup_right_bottom(message_buttons)
grid.addWidget(message_buttons, 2, 1)
grid.addWidget(message_buttons, 2, 1, 2, 1)
main_list = QtGui.QWidget()
self.setup_left_center(main_list)
grid.addWidget(main_list, 1, 0)
grid.addWidget(main_list, 1, 0, 2, 1)
grid.setColumnMinimumWidth(1, 500)
grid.setColumnMinimumWidth(0, 270)
grid.setRowMinimumHeight(1, 250)
grid.setRowMinimumHeight(3, 50)
main.setLayout(grid)
self.setCentralWidget(main)
self.setup_menu(self)
@ -269,8 +270,8 @@ class MainWindow(QtGui.QMainWindow):
def about_program(self):
import util
msgBox = QtGui.QMessageBox()
msgBox.setWindowTitle("About")
msgBox.setText("Toxygen is pythonic Tox client. Version: " + util.program_version)
msgBox.setWindowTitle('About')
msgBox.setText('Toxygen is Tox client written on Python 2.7. Version: ' + util.program_version)
msgBox.exec_()
def network_settings(self):

View file

@ -128,14 +128,14 @@ class ProfileSettings(CenteredWidget):
self.export.setGeometry(QtCore.QRect(200, 250, 150, 30))
self.export.setObjectName("export")
self.export.clicked.connect(self.export_profile)
self.comboBox = QtGui.QComboBox(self)
self.comboBox.setGeometry(QtCore.QRect(30, 350, 211, 27))
self.comboBox.setObjectName("comboBox")
self.tox_id_2 = QtGui.QLabel(self)
self.tox_id_2.setGeometry(QtCore.QRect(40, 310, 121, 31))
self.lang_choose = QtGui.QComboBox(self)
self.lang_choose.setGeometry(QtCore.QRect(30, 350, 211, 27))
self.lang_choose.setObjectName("comboBox")
self.lang_choose.addItem('English')
self.lang = QtGui.QLabel(self)
self.lang.setGeometry(QtCore.QRect(40, 310, 121, 31))
font.setPointSize(18)
self.tox_id_2.setFont(font)
self.tox_id_2.setObjectName("tox_id_2")
self.lang.setFont(font)
self.new_avatar = QtGui.QPushButton(self)
self.new_avatar.setGeometry(QtCore.QRect(400, 50, 200, 50))
self.delete_avatar = QtGui.QPushButton(self)
@ -152,7 +152,7 @@ class ProfileSettings(CenteredWidget):
self.label_2.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Status:", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("ProfileSettingsForm", "TOX ID:", None, QtGui.QApplication.UnicodeUTF8))
self.copyId.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Copy TOX ID", None, QtGui.QApplication.UnicodeUTF8))
self.tox_id_2.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Language:", None, QtGui.QApplication.UnicodeUTF8))
self.lang.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Language:", None, QtGui.QApplication.UnicodeUTF8))
self.new_avatar.setText(QtGui.QApplication.translate("ProfileSettingsForm", "New avatar", None, QtGui.QApplication.UnicodeUTF8))
self.delete_avatar.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Reset avatar", None, QtGui.QApplication.UnicodeUTF8))

View file

@ -87,7 +87,7 @@ class Contact(object):
self._name, self._status_message = name, status_message
self._status, self._widget = None, widget
if type(self) is Profile:
self._widget.name.setText(name if len(name) <= 14 else name[:11] + '...')
self._widget.name.setText(name if len(name) <= 12 else name[:9] + '...')
else:
self._widget.name.setText(name if len(name) <= 20 else name[:17] + '...')
if type(self) is Profile:
@ -108,7 +108,7 @@ class Contact(object):
def set_name(self, value):
self._name = value.decode('utf-8')
if type(self) is Profile:
self._widget.name.setText(self._name if len(self._name) <= 14 else self._name[:11] + '...')
self._widget.name.setText(self._name if len(self._name) <= 12 else self._name[:9] + '...')
else:
self._widget.name.setText(self._name if len(self._name) <= 20 else self._name[:17] + '...')
self._widget.name.repaint()

View file

@ -45,7 +45,7 @@ QWidget
{
color: silver;
background-color: #302F2F;
selection-background-color:#008B8B;
selection-background-color: #A9A9A9;
selection-color: black;
background-clip: border;
border-image: none;
@ -60,7 +60,7 @@ QWidget:item:hover
QWidget:item:selected
{
background-color: #008B8B;
background-color: #A9A9A9;
}
QCheckBox
@ -229,13 +229,13 @@ QMenuBar::item
QMenuBar::item:selected
{
background: transparent;
border: 1px solid #008B8B;
border: 1px solid #A9A9A9;
}
QMenuBar::item:pressed
{
border: 1px solid #3A3939;
background-color: #008B8B;
background-color: #A9A9A9;
color: black;
margin-bottom:-1px;
padding-bottom:1px;
@ -1266,6 +1266,6 @@ QPushButton:hover
#toxygen
{
color: white;
color: #A9A9A9;
}

View file

@ -3,7 +3,7 @@ import time
from platform import system
program_version = '0.0.2 (alpha)'
program_version = '0.0.3'
def log(data):