[gtk+] GtkNotebook: Don't let tab allocation go negative
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkNotebook: Don't let tab allocation go negative
- Date: Thu, 3 Mar 2011 23:35:38 +0000 (UTC)
commit a71e8019433b32923eb04c4b2f8065476ccfb2e1
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 3 18:24:58 2011 -0500
GtkNotebook: Don't let tab allocation go negative
gtk/gtknotebook.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index e50dc6f..a7740d5 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -5740,7 +5740,7 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
{
case GTK_POS_TOP:
case GTK_POS_BOTTOM:
- child_allocation.width = page->requisition.width + tab_overlap + tab_extra_space;
+ child_allocation.width = MAX (1, page->requisition.width + tab_overlap + tab_extra_space);
/* make sure that the reordered tab doesn't go past the last position */
if (priv->operation == DRAG_OPERATION_REORDER &&
@@ -5795,7 +5795,7 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
break;
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
- child_allocation.height = page->requisition.height + tab_overlap + tab_extra_space;
+ child_allocation.height = MAX (1, page->requisition.height + tab_overlap + tab_extra_space);
/* make sure that the reordered tab doesn't go past the last position */
if (priv->operation == DRAG_OPERATION_REORDER &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]