Ejemplo n.º 1
0
 def on_info_win_size_changed(self):
     if self.core.information_win_size >= self.height - 3:
         return
     self.info_header.resize(
         1, self.width, self.height - 2 - self.core.information_win_size -
         Tab.tab_win_height(), 0)
     self.listview.resize(self.height - 3 - self.core.information_win_size -
                          Tab.tab_win_height(), self.width, 1, 0)
Ejemplo n.º 2
0
 def on_info_win_size_changed(self):
     if self.core.information_win_size >= self.height - 3:
         return
     self.dialog.resize(
         self.height - 3 - self.core.information_win_size -
         Tab.tab_win_height(), self.width, 1, 0)
     self.infowin_bottom.resize(
         1, self.width, self.height - 2 - self.core.information_win_size -
         Tab.tab_win_height(), 0)
Ejemplo n.º 3
0
 def resize(self):
     self.need_resize = False
     self.topic_win.resize(1, self.width, 0, 0)
     self.form_win.resize(self.height - 3 - Tab.tab_win_height(),
                          self.width, 1, 0)
     self.help_win.resize(1, self.width, self.height - 1, 0)
     self.help_win_dyn.resize(1, self.width,
                              self.height - 2 - Tab.tab_win_height(), 0)
     self.lines = []
Ejemplo n.º 4
0
 def on_info_win_size_changed(self):
     if self.core.information_win_size >= self.height - 3:
         return
     self.info_header.resize(
         1, self.width, self.height - 2 - self.core.information_win_size -
         Tab.tab_win_height(), 0)
     self.listview.resize(
         self.height - 3 - self.core.information_win_size -
         Tab.tab_win_height(), self.width, 1, 0)
Ejemplo n.º 5
0
 def on_info_win_size_changed(self):
     if self.core.information_win_size >= self.height - 3:
         return
     info_height = self.core.information_win_size
     tab_height = Tab.tab_win_height()
     self.bookmarks_win.resize(self.height - 3 - tab_height - info_height,
                               self.width, 1, 0)
     self.info_header.resize(1, self.width,
                             self.height - 2 - tab_height - info_height, 0)
Ejemplo n.º 6
0
 def on_info_win_size_changed(self):
     if self.core.information_win_size >= self.height - 3:
         return
     info_height = self.core.information_win_size
     tab_height = Tab.tab_win_height()
     self.bookmarks_win.resize(self.height - 3 - tab_height - info_height,
                               self.width, 1, 0)
     self.info_header.resize(1, self.width,
                             self.height - 2 - tab_height - info_height, 0)
Ejemplo n.º 7
0
    def resize(self):
        if self.size.tab_degrade_y:
            info_win_height = 0
            tab_win_height = 0
        else:
            info_win_height = self.core.information_win_size
            tab_win_height = Tab.tab_win_height()

        self.infowin_top.resize(1, self.width, 0, 0)
        self.infowin_bottom.resize(1, self.width, self.height - 2 - info_win_height - tab_win_height, 0)
        self.dialog.resize(self.height - 3 - info_win_height - tab_win_height,
                           self.width, 1, 0)
        self.input.resize(1, self.width, self.height-1, 0)
Ejemplo n.º 8
0
    def resize(self):
        self.need_resize = False
        if self.size.tab_degrade_x:
            display_info = False
            roster_width = self.width
        else:
            display_info = True
            roster_width = self.width // 2
            if self.size.tab_degrade_y:
                display_contact_win = False
                contact_win_h = 0
            else:
                display_contact_win = True
                contact_win_h = 8
        if self.size.tab_degrade_y:
            tab_win_height = 0
        else:
            tab_win_height = Tab.tab_win_height()

        info_width = self.width - roster_width - 1
        if display_info:
            self.v_separator.resize(self.height - 1 - tab_win_height, 1, 0,
                                    roster_width)
            self.information_win.resize(
                self.height - 1 - tab_win_height - contact_win_h, info_width,
                0, roster_width + 1, self.core.information_buffer)
            if display_contact_win:
                y = self.height - tab_win_height - contact_win_h - 1
                avatar_width = contact_win_h * 2
                self.contact_info_win.resize(contact_win_h,
                                             info_width - avatar_width, y,
                                             roster_width + 1)
                self.avatar_win.resize(contact_win_h, avatar_width, y,
                                       self.width - avatar_width)
        self.roster_win.resize(self.height - 1 - Tab.tab_win_height(),
                               roster_width, 0, 0)
        self.input.resize(1, self.width, self.height - 1, 0)
        self.default_help_message.resize(1, self.width, self.height - 1, 0)
Ejemplo n.º 9
0
    def resize(self):
        self.need_resize = False
        if self.size.tab_degrade_x:
            display_info = False
            roster_width = self.width
        else:
            display_info = True
            roster_width = self.width // 2
            if self.size.tab_degrade_y:
                display_contact_win = False
                contact_win_h = 0
            else:
                display_contact_win = True
                contact_win_h = 8
        if self.size.tab_degrade_y:
            tab_win_height = 0
        else:
            tab_win_height = Tab.tab_win_height()

        info_width = self.width - roster_width - 1
        if display_info:
            self.v_separator.resize(self.height - 1 - tab_win_height, 1, 0,
                                    roster_width)
            self.information_win.resize(
                self.height - 1 - tab_win_height - contact_win_h, info_width,
                0, roster_width + 1, self.core.information_buffer)
            if display_contact_win:
                y = self.height - tab_win_height - contact_win_h - 1
                avatar_width = contact_win_h * 2
                self.contact_info_win.resize(contact_win_h,
                                             info_width - avatar_width, y,
                                             roster_width + 1)
                self.avatar_win.resize(contact_win_h, avatar_width, y,
                                       self.width - avatar_width)
        self.roster_win.resize(self.height - 1 - Tab.tab_win_height(),
                               roster_width, 0, 0)
        self.input.resize(1, self.width, self.height - 1, 0)
        self.default_help_message.resize(1, self.width, self.height - 1, 0)
Ejemplo n.º 10
0
    def resize(self):
        if self.size.tab_degrade_y:
            info_win_height = 0
            tab_win_height = 0
        else:
            info_win_height = self.core.information_win_size
            tab_win_height = Tab.tab_win_height()

        self.infowin_top.resize(1, self.width, 0, 0)
        self.infowin_bottom.resize(
            1, self.width, self.height - 2 - info_win_height - tab_win_height,
            0)
        self.dialog.resize(self.height - 3 - info_win_height - tab_win_height,
                           self.width, 1, 0)
        self.input.resize(1, self.width, self.height - 1, 0)
Ejemplo n.º 11
0
    def resize(self):
        self.need_resize = False
        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_buffer)
        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)
Ejemplo n.º 12
0
 def resize(self):
     self.need_resize = False
     self.header_win.resize_columns({
         'room@server/nickname': self.width // 3,
         'password': self.width // 3,
         'autojoin': self.width // 6,
         'storage': self.width // 6
     })
     info_height = self.core.information_win_size
     tab_height = Tab.tab_win_height()
     self.header_win.resize(1, self.width, 0, 0)
     self.bookmarks_win.resize(self.height - 3 - tab_height - info_height,
                               self.width, 1, 0)
     self.help_win.resize(1, self.width, self.height - 1, 0)
     self.info_header.resize(1, self.width,
                             self.height - 2 - tab_height - info_height, 0)
Ejemplo n.º 13
0
    def resize(self):
        self.need_resize = False

        if self.size.tab_degrade_y:
            info_win_height = 0
            tab_win_height = 0
        else:
            info_win_height = self.core.information_win_size
            tab_win_height = Tab.tab_win_height()

        self.text_win.resize(
            self.height - 2 - info_win_height - tab_win_height, self.width, 0,
            0)
        self.text_win.rebuild_everything(self._text_buffer)
        self.info_header.resize(
            1, self.width, self.height - 2 - info_win_height - tab_win_height,
            0)
        self.input.resize(1, self.width, self.height - 1, 0)
Ejemplo n.º 14
0
    def resize(self):
        if self.size.tab_degrade_y:
            info_win_height = 0
            tab_win_height = 0
        else:
            info_win_height = self.core.information_win_size
            tab_win_height = Tab.tab_win_height()

        self.info_header.resize(
            1, self.width, self.height - 2 - info_win_height - tab_win_height,
            0)
        column_size = self.get_columns_sizes()
        self.list_header.resize_columns(column_size)
        self.list_header.resize(1, self.width, 0, 0)
        self.listview.resize_columns(column_size)
        self.listview.resize(
            self.height - 3 - info_win_height - tab_win_height, self.width, 1,
            0)
        self.input.resize(1, self.width, self.height - 1, 0)
Ejemplo n.º 15
0
 def resize(self):
     self.need_resize = False
     self.header_win.resize_columns({
         'name':
         self.width // 4,
         'room@server/nickname':
         self.width // 4,
         'password':
         self.width // 6,
         'autojoin':
         self.width // 6,
         'storage':
         self.width // 6
     })
     info_height = self.core.information_win_size
     tab_height = Tab.tab_win_height()
     self.header_win.resize(1, self.width, 0, 0)
     self.bookmarks_win.resize(self.height - 3 - tab_height - info_height,
                               self.width, 1, 0)
     self.help_win.resize(1, self.width, self.height - 1, 0)
     self.info_header.resize(1, self.width,
                             self.height - 2 - tab_height - info_height, 0)