Fix display oddities on welcome message
[pyrook:pyrook.git] / pyrook_desktop.py
1 #! /usr/bin/env python
2 import sys
3
4 from PySide.QtGui import *
5
6 from PyRook.PyRook import PyRookApplication
7 from PyRook.ChatTab import ChatTab
8
9 # layout function for desktop pyrook
10 def do_layouts(self):
11     # create layouts
12     self.main_layout = QVBoxLayout()
13     self.display_layout = QSplitter()
14     self.input_layout = QHBoxLayout()
15
16     # put things in layouts
17     self.main_layout.addWidget(self.display_layout)
18     self.main_layout.addLayout(self.input_layout)
19     self.display_layout.addWidget(self.chatstream)
20     self.display_layout.addWidget(self.user_list)
21     self.display_layout.setStretchFactor(0, 3)
22     self.display_layout.setStretchFactor(1, 1)
23     self.input_layout.addWidget(self.input_box)
24     self.input_layout.addWidget(self.msg_target)
25
26     self.setLayout(self.main_layout)
27
28 ChatTab.do_layouts = do_layouts
29
30 pyrook = PyRookApplication(sys.argv)
31
32 pyrook.exec_()