Commit a71e8019 authored by Matthias Clasen's avatar Matthias Clasen

GtkNotebook: Don't let tab allocation go negative

parent 8da124aa
......@@ -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 &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment