[patch] gtk_frame_size_allocate()
- From: Lauri Alanko <la iki fi>
- To: gtk-list redhat com
- Subject: [patch] gtk_frame_size_allocate()
- Date: Thu, 31 Jul 1997 23:50:25 +0300 (EEST)
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;
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]