summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-11-20 17:42:56 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-11-20 17:42:56 +0000
commitcbab863627c02d4366e337e48e9d570110feb6e4 (patch)
treeb8dba0721456c6cb74b1f366fabefbaf42804207 /gtk/gtknotebook.c
parent2394977634817390b27a13de8577f865f3ef7e6f (diff)
downloadgtk+-cbab863627c02d4366e337e48e9d570110feb6e4.tar.gz
Fix problem where notebook gap was double shifted by allocation.x/y
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem where notebook gap was double shifted by allocation.x/y * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up to unmap children.
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 498a52856d..f9f08c2113 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -834,6 +834,8 @@ gtk_notebook_unmap (GtkWidget *widget)
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gdk_window_hide (GTK_NOTEBOOK (widget)->event_window);
+
+ GTK_WIDGET_CLASS (parent_class)->unmap (widget);
}
static void
@@ -2443,19 +2445,13 @@ gtk_notebook_paint (GtkWidget *widget,
switch (notebook->tab_pos)
{
case GTK_POS_TOP:
- gap_x = (notebook->cur_page->allocation.x - border_width);
- gap_width = notebook->cur_page->allocation.width;
- break;
case GTK_POS_BOTTOM:
- gap_x = (notebook->cur_page->allocation.x - border_width);
+ gap_x = (notebook->cur_page->allocation.x - widget->allocation.x - border_width);
gap_width = notebook->cur_page->allocation.width;
break;
case GTK_POS_LEFT:
- gap_x = (notebook->cur_page->allocation.y - border_width);
- gap_width = notebook->cur_page->allocation.height;
- break;
case GTK_POS_RIGHT:
- gap_x = (notebook->cur_page->allocation.y - border_width);
+ gap_x = (notebook->cur_page->allocation.y - widget->allocation.y - border_width);
gap_width = notebook->cur_page->allocation.height;
break;
}