diff browser_side/panels.py @ 206:4d7054542751

browser side: contactBox doesn't use left margin anymore (avoid scrollbar issues) + some cosmetic changes to contact panel switch button
author Goffi <goffi@goffi.org>
date Thu, 27 Jun 2013 20:45:41 +0200
parents 2bc6cf004e61
children 3092f6b1710c
line wrap: on
line diff
--- a/browser_side/panels.py	Thu Jun 20 12:16:46 2013 +0200
+++ b/browser_side/panels.py	Thu Jun 27 20:45:41 2013 +0200
@@ -743,29 +743,6 @@
     def onUrlClick(self, sender):
         self._frame.setUrl(self._url.getText())
 
-class ContactTabPanel(HorizontalPanel):
-    """ TabPanel with a contacts list which can be hidden """
-
-    def __init__(self, host, locked = False):
-        self.host=host
-        HorizontalPanel.__init__(self)
-        self._left = VerticalPanel()
-        contacts_switch = Button('<<', self._contactsSwitch)
-        contacts_switch.addStyleName('contactsSwitch')
-        self._left.add(contacts_switch)
-        self._left.add(self.host.contact_panel)
-        self._right = base_widget.WidgetsPanel(host)
-        self._right.setWidth('100%')
-        self._right.setHeight('100%')
-        self.add(self._left)
-        self.add(self._right)
-        self.setCellWidth(self._right, "100%")
-
-    def addWidget(self, wid):
-        """Add a widget to the WidgetsPanel"""
-        print "main addWidget", wid
-        self._right.addWidget(wid)
-
 class MainPanel(AbsolutePanel):
 
     def __init__(self, host):
@@ -783,8 +760,9 @@
         status = host.status_panel
 
         #contacts
-        _contacts = VerticalPanel()
-        contacts_switch = Button('<<', self._contactsSwitch)
+        _contacts = HorizontalPanel()
+        _contacts.addStyleName('globalLeftArea')
+        contacts_switch = Button(u'«', self._contactsSwitch)
         contacts_switch.addStyleName('contactsSwitch')
         _contacts.add(contacts_switch)
         _contacts.add(self.host.contact_panel)
@@ -814,7 +792,7 @@
         """ (Un)hide contacts panel """
         cpanel = self.host.contact_panel
         cpanel.setVisible(not cpanel.getVisible())
-        btn.setText("<<" if cpanel.getVisible() else ">>")
+        btn.setText(u"«" if cpanel.getVisible() else u"»")
         self.host.resize()
 
     def onWindowResized(self, width, height):