updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / gtk3-ubuntu / empty_grid.patch
blob24c52b0795a6846a90bc2fc7d5ae2777ac635551
1 From 97c1df4bb05966a4ce53b07271eff2f53284e235 Mon Sep 17 00:00:00 2001
2 From: Matthias Clasen <mclasen@redhat.com>
3 Date: Fri, 21 Oct 2011 20:23:03 +0000
4 Subject: Fix natural/min widht calculations for empty grids
6 https://bugzilla.gnome.org/show_bug.cgi?id=660139
7 ---
8 diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
9 index a122ad4..78ae2ff 100644
10 --- a/gtk/gtkgrid.c
11 +++ b/gtk/gtkgrid.c
12 @@ -927,8 +927,13 @@ gtk_grid_request_sum (GtkGridRequest *request,
13 linedata = &priv->linedata[orientation];
14 lines = &request->lines[orientation];
16 - min = (nonempty - 1) * linedata->spacing;
17 - nat = (nonempty - 1) * linedata->spacing;
18 + min = 0;
19 + nat = 0;
20 + if (nonempty > 0)
21 + {
22 + min = (nonempty - 1) * linedata->spacing;
23 + nat = (nonempty - 1) * linedata->spacing;
24 + }
26 for (i = 0; i < lines->max - lines->min; i++)
29 cgit v0.9.0.2