summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2005-07-27 00:00:05 +0000
committerOwen Taylor <otaylor@src.gnome.org>2005-07-27 00:00:05 +0000
commitcd2ff9ab026495c340394d6b19af198a28d98923 (patch)
tree6e08267f3047180af0b6902bfe1edae9f15eb6da /gtk/gtknotebook.c
parentdbadd50ad713b7864845c48fd327f358bad39d4b (diff)
downloadgtk+-cd2ff9ab026495c340394d6b19af198a28d98923.tar.gz
Fix to be monotonic in the original size (#308145, Morten Welinder)
2005-07-26 Owen Taylor <otaylor@redhat.com> * gtk/gtknotebook.c (gtk_notebook_page_allocate): Fix to be monotonic in the original size (#308145, Morten Welinder)
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index eb18477885..881d310f57 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -3611,14 +3611,12 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
case GTK_POS_TOP:
page->allocation.y += ythickness;
case GTK_POS_BOTTOM:
- if (page->allocation.height >= ythickness)
- page->allocation.height -= ythickness;
+ page->allocation.height = MAX (1, page->allocation.height - ythickness);
break;
case GTK_POS_LEFT:
page->allocation.x += xthickness;
case GTK_POS_RIGHT:
- if (page->allocation.width >= xthickness)
- page->allocation.width -= xthickness;
+ page->allocation.width = MAX (1, page->allocation.width - xthickness);
break;
}
}