diff --git a/memos.py b/memos.py index e2718ec..b504857 100644 --- a/memos.py +++ b/memos.py @@ -359,6 +359,12 @@ class PesterMemo(PesterConvo): self.textInput = MemoInput(self.mainwindow.theme, self) self.textInput.setFocus() + self.miniUserlist = QtGui.QPushButton(">\n>", self) + #self.miniUserlist.setStyleSheet("border:1px solid #a68168; border-width: 2px 0px 2px 2px; height: 90px; width: 10px; color: #cd8f9d; font-family: 'Arial'; background: white; margin-left: 2px;") + self.connect(self.miniUserlist, QtCore.SIGNAL('clicked()'), + self, QtCore.SLOT('toggleUserlist()')) + + self.userlist = RightClickList(self) self.userlist.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)) self.userlist.optionsMenu = QtGui.QMenu(self) @@ -449,6 +455,7 @@ class PesterMemo(PesterConvo): layout_1 = QtGui.QHBoxLayout() layout_1.addLayout(layout_0) + layout_1.addWidget(self.miniUserlist) layout_1.addWidget(self.userlist) # layout_1 = QtGui.QGridLayout() @@ -489,6 +496,17 @@ class PesterMemo(PesterConvo): self.history = PesterHistory() self.applyquirks = True + @QtCore.pyqtSlot() + def toggleUserlist(self): + if self.userlist.isHidden(): + self.userlist.show() + self.miniUserlist.setText(">\n>") + self.miniUserlist.setStyleSheet("%s border-width: 2px 0px 2px 2px;" % self.miniUserlist.styleSheet()) + else: + self.userlist.hide() + self.miniUserlist.setText("<\n<") + self.miniUserlist.setStyleSheet("%s border-width: 2px;" % self.miniUserlist.styleSheet()) + def title(self): return self.channel def icon(self): @@ -542,6 +560,13 @@ class PesterMemo(PesterConvo): else: self.userlist.setStyleSheet("QListWidget { %s } QScrollBar { %s } QScrollBar::handle { %s }" % (theme["memos/userlist/style"], scrolls, "background-color: black;")) self.userlist.setFixedWidth(theme["memos/userlist/width"]) + + if self.userlist.isHidden(): + borders = "border-width: 2px;" + else: + borders = "border-width: 2px 0px 2px 2px;" + self.miniUserlist.setStyleSheet("%s padding: 0px; margin: 0px; margin-left: 5px; width: 10px; height: 90px; %s" % (theme["memos/userlist/style"], borders)) + self.addchumAction.setText(theme["main/menus/rclickchumlist/addchum"]) self.banuserAction.setText(theme["main/menus/rclickchumlist/banuser"]) self.opAction.setText(theme["main/menus/rclickchumlist/opuser"]) diff --git a/themes/FRESHjamz/style.js b/themes/FRESHjamz/style.js index 4014c0f..32448b6 100644 --- a/themes/FRESHjamz/style.js +++ b/themes/FRESHjamz/style.js @@ -247,7 +247,7 @@ }, "margins": {"top": 10, "bottom": 10, "left": 9, "right": 4 }, "userlist": { "width": 125, - "style": "font-size: 12px; background: white; margin-left: 5px; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" + "style": "font-size: 12px; background: white; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" }, "time": { "text": { "width": 75, "style": "color: black; font:bold; border:1px solid #c2c2c2; background: white; height: 19px;" diff --git a/themes/Scratch/style.js b/themes/Scratch/style.js index 7c92916..1bf32de 100644 --- a/themes/Scratch/style.js +++ b/themes/Scratch/style.js @@ -244,7 +244,7 @@ }, "margins": {"top": 10, "bottom": 10, "left": 9, "right": 4 }, "userlist": { "width": 125, - "style": "font-size: 12px; background: white; margin-left: 5px; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" + "style": "font-size: 12px; background: white; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" }, "time": { "text": { "width": 75, "style": "color: black; font:bold; border:1px solid #c2c2c2; background: white; height: 19px;" diff --git a/themes/Zodiac/style.js b/themes/Zodiac/style.js index 8ecc8d4..66c615b 100644 --- a/themes/Zodiac/style.js +++ b/themes/Zodiac/style.js @@ -409,7 +409,7 @@ }, "margins": {"top": 10, "bottom": 10, "left": 9, "right": 4 }, "userlist": { "width": 125, - "style": "font-size: 12px; background: white; margin-left: 5px; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" + "style": "font-size: 12px; background: white; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" }, "time": { "text": { "width": 75, "style": "color: black; font:bold; border:1px solid #c2c2c2; background: white; height: 19px;" diff --git a/themes/trollian/style.js b/themes/trollian/style.js index d824c98..5ed485c 100644 --- a/themes/trollian/style.js +++ b/themes/trollian/style.js @@ -329,7 +329,7 @@ }, "margins": {"top": 22, "bottom": 10, "left": 9, "right": 4 }, "userlist": { "width": 125, - "style": "font-size: 12px; background: white; margin-left: 5px; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" + "style": "font-size: 12px; background: white; margin-bottom: 5px; border:2px solid #c2c2c2; padding: 5px; font-family: 'Arial';selection-background-color:rgb(200,200,200);" }, "time": { "text": { "width": 75, "style": "color: black; font:bold; border:1px solid #c2c2c2; background: white; height: 19px;" diff --git a/toast.py b/toast.py index 4a5e2a1..1e342c4 100644 --- a/toast.py +++ b/toast.py @@ -88,7 +88,6 @@ class ToastMachine(object): if pynotify else {'default' : DefaultToast}), extras={}): - print types self.mainwindow = parent self.name = name types.update(extras)