summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-14 02:24:04 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-14 02:24:04 +0000
commit534b39ae8d9023045e7f3c0bb616add17dbe6791 (patch)
treef9928c8ffca6bebb49ec40e883fa4064a6caad14 /src
parent33f197b4ab8f65e33c30b789fb34157b70f1105d (diff)
downloadpoezio-534b39ae8d9023045e7f3c0bb616add17dbe6791.tar.gz
poezio-534b39ae8d9023045e7f3c0bb616add17dbe6791.tar.bz2
poezio-534b39ae8d9023045e7f3c0bb616add17dbe6791.tar.xz
poezio-534b39ae8d9023045e7f3c0bb616add17dbe6791.zip
fix the resize of PrivateTab
Diffstat (limited to 'src')
-rw-r--r--src/tab.py20
-rw-r--r--src/window.py1
2 files changed, 12 insertions, 9 deletions
diff --git a/src/tab.py b/src/tab.py
index 2b9615b0..6dc60bb2 100644
--- a/src/tab.py
+++ b/src/tab.py
@@ -23,7 +23,7 @@ Window are displayed, etc
"""
MIN_WIDTH = 50
-MIN_HEIGHT = 10
+MIN_HEIGHT = 16
import window
import theme
@@ -297,16 +297,17 @@ class PrivateTab(Tab):
Tab.__init__(self, stdscr)
self.info_win_size = info_win_size
self._room = room
- self.text_win = window.TextWin(self.height-2, self.width, 0, 0, stdscr, self.visible)
+ self.text_win = window.TextWin(self.height-2-self.info_win_size, self.width, 0, 0, stdscr, self.visible)
self.info_header = window.PrivateInfoWin(1, self.width, self.height-3-self.info_win_size, 0, stdscr, self.visible)
- self.info_win = window.TextWin(info_win_size, (self.width//10)*9, self.height-2-self.info_win_size, 0, stdscr, self.visible)
+ self.info_win = window.TextWin(self.info_win_size, self.width, self.height-2-self.info_win_size, 0, stdscr, self.visible)
self.tab_win = window.GlobalInfoBar(1, self.width, self.height-2, 0, stdscr, self.visible)
self.input = window.Input(1, self.width, self.height-1, 0, stdscr, self.visible)
def resize(self, stdscr):
- self.text_win.resize(self.height-2, self.width, 0, 0, stdscr, self.visible)
+ Tab.resize(self, stdscr)
+ self.text_win.resize(self.height-2-self.info_win_size, self.width, 0, 0, stdscr, self.visible)
self.info_header.resize(1, self.width, self.height-3-self.info_win_size, 0, stdscr, self.visible)
- self.info_win.resize(info_win_size, (self.width//10)*9, self.height-2-self.info_win_size, 0, stdscr, self.visible)
+ self.info_win.resize(self.info_win_size, self.width, self.height-2-self.info_win_size, 0, stdscr, self.visible)
self.tab_win.resize(1, self.width, self.height-2, 0, stdscr, self.visible)
self.input.resize(1, self.width, self.height-1, 0, stdscr, self.visible)
@@ -348,10 +349,13 @@ class PrivateTab(Tab):
def on_info_win_size_changed(self, size, stdscr):
self.info_win_size = size
- text_width = (self.width//10)*9
- self.text_win.resize(self.height-4-self.info_win_size, text_width, 1, 0, stdscr, self.visible)
- self.info_header.resize(1, (self.width//10)*9, self.height-3-self.info_win_size, 0, stdscr, self.visible)
+ self.text_win.resize(self.height-2, self.width, 0, 0, stdscr, self.visible)
+ self.info_header.resize(1, self.width, self.height-3-self.info_win_size, 0, stdscr, self.visible)
self.info_win.resize(self.info_win_size, (self.width//10)*9, self.height-2-self.info_win_size, 0, stdscr, self.visible)
+ # self.text_win.resize(self.height-4-self.info_win_size, text_width, 1, 0, stdscr, self.visible)
+ # self.info_header.resize(1, (self.width//10)*9, self.height-3-self.info_win_size, 0, stdscr, self.visible)
+ # self.info_win.resize(self.info_win_size, (self.width//10)*9, self.height-2-self.info_win_size, 0, stdscr, self.visible)
+
def get_room(self):
return self._room
diff --git a/src/window.py b/src/window.py
index 28229e2f..c9576873 100644
--- a/src/window.py
+++ b/src/window.py
@@ -908,7 +908,6 @@ class VerticalSeparator(Win):
self._resize(height, width, y, x, stdscr)
if not visible:
return
- self.rewrite_line()
def refresh(self):
if not self.visible: