diff src/browser/sat_browser/libervia_widget.py @ 654:40c72f3b7638 frontends_multi_profiles

browser_side: MainPanel is now based on a DockPanel, which allows to use less tables and also to remove some "window resized" listeners
author souliane <souliane@mailoo.org>
date Fri, 27 Feb 2015 02:39:43 +0100
parents 0262fee86375
children 4dbd99de3aaa
line wrap: on
line diff
--- a/src/browser/sat_browser/libervia_widget.py	Fri Feb 27 01:45:34 2015 +0100
+++ b/src/browser/sat_browser/libervia_widget.py	Fri Feb 27 02:39:43 2015 +0100
@@ -746,12 +746,10 @@
     """The panel managing the tabs"""
 
     def __init__(self, host):
-        TabPanel.__init__(self)
+        TabPanel.__init__(self, FloatingTab=True)
         ClickHandler.__init__(self)
         self.host = host
         self.setStyleName('liberviaTabPanel')
-        self.addStyleName('mainTabPanel')
-        Window.addWindowResizeListener(self)
 
         self.tabBar.addTab(u'✚', True)
 
@@ -776,19 +774,6 @@
         """
         return self.deck.visibleWidget
 
-    def onWindowResized(self, width, height):
-        tab_panel_elt = self.getElement()
-        _elts = doc().getElementsByClassName('gwt-TabBar')
-        if not _elts.length:
-            log.error("no TabBar found, it should exist !")
-            tab_bar_h = 0
-        else:
-            tab_bar_h = _elts.item(0).offsetHeight
-        ideal_height = height - DOM.getAbsoluteTop(tab_panel_elt) - tab_bar_h - 5
-        ideal_width = width - DOM.getAbsoluteLeft(tab_panel_elt) - 5
-        self.setWidth("%s%s" % (ideal_width, "px"))
-        self.setHeight("%s%s" % (ideal_height, "px"))
-
     def addTab(self, widget, label, select=False):
         """Create a new tab for the given widget.