diff options
Diffstat (limited to 'src/tab.py')
-rw-r--r-- | src/tab.py | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -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 |