Mercurial > libervia-web
comparison browser_side/panels.py @ 185:40adfd4ee4d7
browser side: fixed MainTabPanel size
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 03 Mar 2013 03:13:00 +0100 |
parents | 97d5e9de1106 |
children | 72bb1d845b6a |
comparison
equal
deleted
inserted
replaced
184:97d5e9de1106 | 185:40adfd4ee4d7 |
---|---|
1024 print ("ERROR: no TabBar found, it should exist !") | 1024 print ("ERROR: no TabBar found, it should exist !") |
1025 tab_bar_h = 0 | 1025 tab_bar_h = 0 |
1026 else: | 1026 else: |
1027 tab_bar_h = _elts.item(0).offsetHeight | 1027 tab_bar_h = _elts.item(0).offsetHeight |
1028 ideal_height = Window.getClientHeight() - DOM.getAbsoluteTop(tab_panel_elt) - tab_bar_h - 5 | 1028 ideal_height = Window.getClientHeight() - DOM.getAbsoluteTop(tab_panel_elt) - tab_bar_h - 5 |
1029 ideal_width = width - self.host.contact_panel.getElement().offsetWidth - 5 | 1029 ideal_width = width - DOM.getAbsoluteLeft(tab_panel_elt) - 5 |
1030 self.setWidth("%s%s" % (ideal_width, "px")); | 1030 self.setWidth("%s%s" % (ideal_width, "px")); |
1031 self.setHeight("%s%s" % (ideal_height, "px")); | 1031 self.setHeight("%s%s" % (ideal_height, "px")); |
1032 | 1032 |
1033 def add(self, widget, tabText=None, asHTML=False): | 1033 def add(self, widget, tabText=None, asHTML=False): |
1034 TabPanel.add(self, widget, tabText, asHTML) | 1034 TabPanel.add(self, widget, tabText, asHTML) |