summaryrefslogtreecommitdiff
path: root/src/tabs/xmltab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-28 23:29:21 +0200
committermathieui <mathieui@mathieui.net>2014-04-28 23:29:21 +0200
commit0caf9417b27a67bd6b78a96d22618ef6dd995937 (patch)
treef42e0e982faa5a88d590eba45165c2f8951bf0be /src/tabs/xmltab.py
parent069283e349b2e8dd324446aa5c30253a0993f1a3 (diff)
downloadpoezio-0caf9417b27a67bd6b78a96d22618ef6dd995937.tar.gz
poezio-0caf9417b27a67bd6b78a96d22618ef6dd995937.tar.bz2
poezio-0caf9417b27a67bd6b78a96d22618ef6dd995937.tar.xz
poezio-0caf9417b27a67bd6b78a96d22618ef6dd995937.zip
Make the size modular, remove small-size lock (also seems to fix #2155)
some stuff is now hidden wen the window size gets too small (might need some adjustments). The info buffer in the roster tab, the userlist in mucs, the vertical tab list, the info buffer everywhere, etc…
Diffstat (limited to 'src/tabs/xmltab.py')
-rw-r--r--src/tabs/xmltab.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/tabs/xmltab.py b/src/tabs/xmltab.py
index a2728586..7c79da67 100644
--- a/src/tabs/xmltab.py
+++ b/src/tabs/xmltab.py
@@ -163,23 +163,38 @@ class XMLTab(Tab):
self.core.close_tab()
def resize(self):
- if self.core.information_win_size >= self.height-3 or not self.visible:
- return
self.need_resize = False
- min = 1 if self.left_tab_win else 2
- self.text_win.resize(self.height-self.core.information_win_size - Tab.tab_win_height() - 2, self.width, 0, 0)
+ if self.size.tab_degrade_y:
+ info_win_size = 0
+ tab_win_height = 0
+ else:
+ info_win_size = self.core.information_win_size
+ tab_win_height = Tab.tab_win_height()
+
+ self.text_win.resize(self.height - info_win_size - tab_win_height - 2,
+ self.width, 0, 0)
self.text_win.rebuild_everything(self.core.xml_buffer)
- self.info_header.resize(1, self.width, self.height-2-self.core.information_win_size - Tab.tab_win_height(), 0)
+ self.info_header.resize(1, self.width,
+ self.height - 2 - info_win_size
+ - tab_win_height,
+ 0)
self.input.resize(1, self.width, self.height-1, 0)
def refresh(self):
if self.need_resize:
self.resize()
log.debug(' TAB Refresh: %s', self.__class__.__name__)
+
+ if self.size.tab_degrade_y:
+ display_info_win = False
+ else:
+ display_info_win = True
+
self.text_win.refresh()
self.info_header.refresh(self.filter_type, self.filter, self.text_win)
self.refresh_tab_win()
- self.info_win.refresh()
+ if display_info_win:
+ self.info_win.refresh()
self.input.refresh()
def on_lose_focus(self):