summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-06-26 23:44:19 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-06-26 23:44:19 +0000
commitc5c75ece065d98b98cea8dc6758e9b0c2a3c509b (patch)
treefb53adbe2f35d80fa9e9ea5ab9cf05d4f7a321c9 /gtk
parent2bb4bcff5d757075502019b0838677c9895ee5b7 (diff)
downloadgdk-pixbuf-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')
-rw-r--r--gtk/gtkaspectframe.c2
-rw-r--r--gtk/gtkframe.c36
2 files changed, 19 insertions, 19 deletions
diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c
index 8040a1471..00fbde6c1 100644
--- a/gtk/gtkaspectframe.c
+++ b/gtk/gtkaspectframe.c
@@ -282,4 +282,6 @@ gtk_aspect_frame_compute_child_allocation (GtkFrame *frame,
child_allocation->x = full_allocation.x + aspect_frame->xalign * (full_allocation.width - child_allocation->width);
child_allocation->y = full_allocation.y + aspect_frame->yalign * (full_allocation.height - child_allocation->height);
}
+ else
+ parent_class->compute_child_allocation (frame, child_allocation);
}
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index dc58e68f8..f063b9356 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;