[615] in The GTK GIMP ToolKit mailing list archive
[gtk-list] [patch] gtk_frame_size_allocate()
daemon@ATHENA.MIT.EDU (Lauri Alanko)
Thu Jul 31 16:50:21 1997
Date: Thu, 31 Jul 1997 23:50:25 +0300 (EEST)
From: Lauri Alanko <la@iki.fi>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
Hello, all.
Below is a patch that fixes bogus sizings for GtkFrame's contents.
It's bounds checking again, and pretty bad, too, since gint16:s are in
question.
Lauri Alanko
la@iki.fi
--- gtkframe.c.old Fri Jun 6 10:01:59 1997
+++ gtkframe.c Thu Jul 31 23:35:08 1997
@@ -382,11 +382,11 @@
child_allocation.x = (GTK_CONTAINER (frame)->border_width +
GTK_WIDGET (frame)->style->klass->xthickness);
- child_allocation.width = allocation->width - child_allocation.x * 2;
+ child_allocation.width = MAX(0, allocation->width - child_allocation.x * 2);
child_allocation.y = (GTK_CONTAINER (frame)->border_width +
MAX (frame->label_height, GTK_WIDGET (frame)->style->klass->ythickness));
- child_allocation.height = (allocation->height - child_allocation.y -
+ child_allocation.height = MAX(0, (allocation->height - child_allocation.y -
GTK_CONTAINER (frame)->border_width -
- GTK_WIDGET (frame)->style->klass->ythickness);
+ GTK_WIDGET (frame)->style->klass->ythickness));
child_allocation.x += allocation->x;
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null