summaryrefslogtreecommitdiff
path: root/gtk/gtkcheckbutton.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-06-12 20:23:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-06-12 20:23:30 +0000
commite9ed9a7fa16123d4ddac9e22f17d47c75defa488 (patch)
treedac8cf7b78544f58ed3e0087c8fb15698e2f4fb8 /gtk/gtkcheckbutton.c
parentf51ef574b51d93eca5650fa37f55775b24b65ff1 (diff)
downloadgtk+-e9ed9a7fa16123d4ddac9e22f17d47c75defa488.tar.gz
Clamp size of child to at least 1x1. (#82431, Boris Shingarov.)
Wed Jun 12 16:21:38 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Clamp size of child to at least 1x1. (#82431, Boris Shingarov.)
Diffstat (limited to 'gtk/gtkcheckbutton.c')
-rw-r--r--gtk/gtkcheckbutton.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 6d91153076..5e3ef30d51 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -301,9 +301,12 @@ gtk_check_button_size_allocate (GtkWidget *widget,
allocation->width -
((border_width + focus_width + focus_pad) * 2
+ indicator_size + indicator_spacing * 3));
+ child_allocation.width = MAX (child_allocation.width, 1);
child_allocation.height = MIN (child_requisition.height,
allocation->height - (border_width + focus_width + focus_pad) * 2);
+ child_allocation.height = MAX (child_allocation.height, 1);
+
child_allocation.x = (border_width + indicator_size + indicator_spacing * 3 +
widget->allocation.x + focus_width + focus_pad);
child_allocation.y = widget->allocation.y +