diff options
author | Lorenzo Gil Sanchez <lgs@cvs.gnome.org> | 2004-06-09 14:59:40 +0000 |
---|---|---|
committer | Lorenzo Gil Sanchez <lgs@src.gnome.org> | 2004-06-09 14:59:40 +0000 |
commit | 361154b03814785db39570fefbf242b4078b2ebb (patch) | |
tree | 15eeaafc5b8eaabd1d030fac9fdf796060a6ffb4 /examples | |
parent | 1450c625b71a4e3833068b09b66cc675d90383ec (diff) | |
download | pygtk-361154b03814785db39570fefbf242b4078b2ebb.tar.gz |
change the allocation parameter to requisition so we have a more clear
2004-06-09 Lorenzo Gil Sanchez <lgs@cvs.gnome.org>
* examples/gtk/widget.py (PyGtkWidget.do_size_request): change the
allocation parameter to requisition so we have a more clear example.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gtk/widget.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/gtk/widget.py b/examples/gtk/widget.py index 656f913b..3aad1571 100644 --- a/examples/gtk/widget.py +++ b/examples/gtk/widget.py @@ -43,10 +43,10 @@ class PyGtkWidget(gtk.Widget): self.style.attach(self.window) self.style.set_background(self.window, gtk.STATE_NORMAL) - def do_size_request(self, allocation): + def do_size_request(self, requisition): width, height = self.layout.get_size() - allocation.width = width // pango.SCALE + BORDER_WIDTH*4 - allocation.height = height // pango.SCALE + BORDER_WIDTH*4 + requisition.width = width // pango.SCALE + BORDER_WIDTH*4 + requisition.height = height // pango.SCALE + BORDER_WIDTH*4 def do_size_allocate(self, allocation): self.allocation = allocation |