diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-06-26 23:44:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-06-26 23:44:19 +0000 |
commit | c5c75ece065d98b98cea8dc6758e9b0c2a3c509b (patch) | |
tree | fb53adbe2f35d80fa9e9ea5ab9cf05d4f7a321c9 /gtk/gtkframe.c | |
parent | 2bb4bcff5d757075502019b0838677c9895ee5b7 (diff) | |
download | gtk+-c5c75ece065d98b98cea8dc6758e9b0c2a3c509b.tar.gz |
Put 1.3.1 in warning message, not 1.3.0.
Mon Jun 26 19:37:04 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Put 1.3.1 in warning message, not 1.3.0.
(Fixes problem with drawing childless frames. Pointed out
by and a first patch from Anders)
* gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always
compute a child_allocation, even if we don't have a child.
* gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation):
Always chain to the parent's impl, even if we don't have a child.
Diffstat (limited to 'gtk/gtkframe.c')
-rw-r--r-- | gtk/gtkframe.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index dc58e68f82..f063b9356b 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -506,29 +506,27 @@ gtk_frame_size_allocate (GtkWidget *widget, { GtkFrame *frame = GTK_FRAME (widget); GtkBin *bin = GTK_BIN (widget); + GtkAllocation new_allocation; widget->allocation = *allocation; + gtk_frame_compute_child_allocation (frame, &new_allocation); + + /* If the child allocation changed, that means that the frame is drawn + * in a new place, so we must redraw the entire widget. + */ + if (GTK_WIDGET_MAPPED (widget) && + (new_allocation.x != frame->child_allocation.x || + new_allocation.y != frame->child_allocation.y || + new_allocation.width != frame->child_allocation.width || + new_allocation.height != frame->child_allocation.height)) + gtk_widget_queue_clear (widget); + if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) - { - GtkAllocation new_allocation; - - gtk_frame_compute_child_allocation (frame, &new_allocation); - - /* If the child allocation changed, that means that the frame is drawn - * in a new place, so we must redraw the entire widget. - */ - if (GTK_WIDGET_MAPPED (widget) && - (new_allocation.x != frame->child_allocation.x || - new_allocation.y != frame->child_allocation.y || - new_allocation.width != frame->child_allocation.width || - new_allocation.height != frame->child_allocation.height)) - gtk_widget_queue_clear (widget); - - gtk_widget_size_allocate (bin->child, &new_allocation); - frame->child_allocation = new_allocation; - } - + gtk_widget_size_allocate (bin->child, &new_allocation); + + frame->child_allocation = new_allocation; + if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget)) { GtkRequisition child_requisition; |