tuikit/core/window.py
changeset 93 c1e79acb9fcb
parent 90 781774a8d568
child 94 e50dae408fe9
equal deleted inserted replaced
92:b97c4e25ed6d 93:c1e79acb9fcb
    24 
    24 
    25     @buffer.setter
    25     @buffer.setter
    26     def buffer(self, buffer):
    26     def buffer(self, buffer):
    27         # replace the buffer
    27         # replace the buffer
    28         self._buffer = buffer
    28         self._buffer = buffer
    29         self.size = buffer.size
    29 
       
    30     @property
       
    31     def size(self):
       
    32         return self.buffer.size
    30 
    33 
    31     def resize(self, w, h):
    34     def resize(self, w, h):
    32         """Resize buffer when window gets resized."""
    35         """Resize buffer when window gets resized."""
       
    36         Container.resize(self, w, h)
    33         self.buffer.resize(w, h)
    37         self.buffer.resize(w, h)
    34         self.redraw()
    38         self.redraw()
    35 
    39 
    36     def redraw(self):
    40     def redraw(self):
    37         Container.draw(self, self.buffer)
    41         Container.draw(self, self.buffer)