(self)
Resize wnds
Resize wnds
Resize wnds
def on_console_resized(self):
        """Resize wnds"""
        self.height, self.width = self._cwnd.getmaxyx()
        self.messagebar.set_rect(
            0, self.height - self.MESSAGEBAR_HEIGHT, self.width, self.height)

        if self.inputline and not self.inputline.closed:
            w, h = self.inputline.getsize()
            editorheight = max(1, self.height - h - self.MESSAGEBAR_HEIGHT)
        else:
            editorheight = max(1, self.height - self.MESSAGEBAR_HEIGHT)

        if self.activeframe:
            self.activeframe.set_rect(0, 0, self.width, editorheight)

        for popup in self.popups:
            popup.on_console_resized()
def on_console_resized ( self ) : self . height , self . width = self . _cwnd . getmaxyx ( ) self . messagebar . set_rect ( 0 , self . height - self . MESSAGEBAR_HEIGHT , self . width , self . height ) if self . inputline and not self . inputline . closed : w , h = self . inputline . getsize ( ) editorheight = max ( 1 , self . height - h - self . MESSAGEBAR_HEIGHT ) else : editorheight = max ( 1 , self . height - self . MESSAGEBAR_HEIGHT ) if self . activeframe : self . activeframe . set_rect ( 0 , 0 , self . width , editorheight ) for popup in self . popups : popup . on_console_resized ( )