changeset 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 ee744ffed7fc
children a43b66af3872
files browser_side/panels.py public/libervia.css
diffstat 2 files changed, 10 insertions(+), 33 deletions(-) [+]
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):
--- a/public/libervia.css	Thu Jun 20 12:16:46 2013 +0200
+++ b/public/libervia.css	Thu Jun 27 20:45:41 2013 +0200
@@ -376,8 +376,6 @@
 /* Contact List */
 
 div.contactBox {
-    margin-left: 20px;
-    margin-top: 9px;
     width: 100%;
 }
 
@@ -394,11 +392,8 @@
     /* Button used to switch contacts panel */
     background: none;
     border: 0;
-    font-size: xx-small;
-    margin-left: -4px;
-    margin-top: 10px;
-    position: absolute;
-    z-index: 50;
+    padding: 0;
+    font-size: large;
 }
 
 .groupList {
@@ -1091,6 +1086,10 @@
   cursor: default;
 }
 
+.globalLeftArea {
+    margin-top: 9px;
+}
+
 
 /* Misc */