[Anygui-checkins] CVS: anygui/lib/anygui Frames.py,1.12,1.13
Brought to you by:
mlh
From: Joseph A K. <jk...@us...> - 2001-11-25 03:51:18
|
Update of /cvsroot/anygui/anygui/lib/anygui In directory usw-pr-cvs1:/tmp/cvs-serv27132 Modified Files: Frames.py Log Message: Stupid me. Easy to handle the resizing at the abstract level. Backends now should not have to worry about it. Index: Frames.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/Frames.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** Frames.py 2001/11/25 03:00:25 1.12 --- Frames.py 2001/11/25 03:51:15 1.13 *************** *** 195,196 **** --- 195,208 ---- self._contents.remove(comp) comp.destroy() + + # We need some special machinery here to ensure subcomponents + # get resized properly. + def container_resized(self, cdw, cdh): + old_w = self._width + old_h = self._height + AbstractComponent.container_resized(self,cdw,cdh) + dw = self._width - old_w + dh = self._height - old_h + for comp in self._contents: + comp.container_resized(dw,dh) + |