From 63596d22ae193d19c6c445fad3a104e13a1700f9 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 22 May 1998 21:33:44 +0000 Subject: [PATCH] Fix size_allocate to pass on to the child even if child isn't visible. Fix size_allocate to pass on to the child even if child isn't visible. Also locate child at (border_width, border_width) not (0,0) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkeventbox.c | 6 +++--- 8 files changed, 45 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d46f44ba27..f18865205b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-05-22 + + * gtk/gtkeventbox.c: Pass size_allocate on to the child + regardless of whether it is visible or not. Also + locate child at (border_width,border_width), not (0,0) + Fri May 22 03:02:40 1998 Owen Taylor * gtk/gtkhandlebox.c: Added style_set handler. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d46f44ba27..f18865205b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +1998-05-22 + + * gtk/gtkeventbox.c: Pass size_allocate on to the child + regardless of whether it is visible or not. Also + locate child at (border_width,border_width), not (0,0) + Fri May 22 03:02:40 1998 Owen Taylor * gtk/gtkhandlebox.c: Added style_set handler. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d46f44ba27..f18865205b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +1998-05-22 + + * gtk/gtkeventbox.c: Pass size_allocate on to the child + regardless of whether it is visible or not. Also + locate child at (border_width,border_width), not (0,0) + Fri May 22 03:02:40 1998 Owen Taylor * gtk/gtkhandlebox.c: Added style_set handler. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d46f44ba27..f18865205b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +1998-05-22 + + * gtk/gtkeventbox.c: Pass size_allocate on to the child + regardless of whether it is visible or not. Also + locate child at (border_width,border_width), not (0,0) + Fri May 22 03:02:40 1998 Owen Taylor * gtk/gtkhandlebox.c: Added style_set handler. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d46f44ba27..f18865205b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +1998-05-22 + + * gtk/gtkeventbox.c: Pass size_allocate on to the child + regardless of whether it is visible or not. Also + locate child at (border_width,border_width), not (0,0) + Fri May 22 03:02:40 1998 Owen Taylor * gtk/gtkhandlebox.c: Added style_set handler. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d46f44ba27..f18865205b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +1998-05-22 + + * gtk/gtkeventbox.c: Pass size_allocate on to the child + regardless of whether it is visible or not. Also + locate child at (border_width,border_width), not (0,0) + Fri May 22 03:02:40 1998 Owen Taylor * gtk/gtkhandlebox.c: Added style_set handler. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d46f44ba27..f18865205b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +1998-05-22 + + * gtk/gtkeventbox.c: Pass size_allocate on to the child + regardless of whether it is visible or not. Also + locate child at (border_width,border_width), not (0,0) + Fri May 22 03:02:40 1998 Owen Taylor * gtk/gtkhandlebox.c: Added style_set handler. diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c index fb19db7b55..d6d699d9ff 100644 --- a/gtk/gtkeventbox.c +++ b/gtk/gtkeventbox.c @@ -161,8 +161,8 @@ gtk_event_box_size_allocate (GtkWidget *widget, widget->allocation = *allocation; bin = GTK_BIN (widget); - child_allocation.x = 0; - child_allocation.y = 0; + child_allocation.x = GTK_CONTAINER (widget)->border_width; + child_allocation.y = GTK_CONTAINER (widget)->border_width; child_allocation.width = MAX (allocation->width - GTK_CONTAINER (widget)->border_width * 2, 0); child_allocation.height = MAX (allocation->height - GTK_CONTAINER (widget)->border_width * 2, 0); @@ -175,7 +175,7 @@ gtk_event_box_size_allocate (GtkWidget *widget, child_allocation.height); } - if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) + if (bin->child) { gtk_widget_size_allocate (bin->child, &child_allocation); }