summaryrefslogtreecommitdiff
path: root/extra/gtk3/empty_grid.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-12-30 23:14:51 +0000
committerroot <root@rshg054.dnsready.net>2011-12-30 23:14:51 +0000
commit5d738f85840804ee493d267784d9cce5dc52f535 (patch)
tree646f79576fee9f326fa833f7ca480d2355056556 /extra/gtk3/empty_grid.patch
parent8a823402bd45dc875237a20f174ecbe64e1bae4d (diff)
Fri Dec 30 23:14:51 UTC 2011
Diffstat (limited to 'extra/gtk3/empty_grid.patch')
-rw-r--r--extra/gtk3/empty_grid.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/extra/gtk3/empty_grid.patch b/extra/gtk3/empty_grid.patch
new file mode 100644
index 000000000..45aefde47
--- /dev/null
+++ b/extra/gtk3/empty_grid.patch
@@ -0,0 +1,29 @@
+From 97c1df4bb05966a4ce53b07271eff2f53284e235 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Fri, 21 Oct 2011 20:23:03 +0000
+Subject: Fix natural/min widht calculations for empty grids
+
+https://bugzilla.gnome.org/show_bug.cgi?id=660139
+---
+diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
+index a122ad4..78ae2ff 100644
+--- a/gtk/gtkgrid.c
++++ b/gtk/gtkgrid.c
+@@ -927,8 +927,13 @@ gtk_grid_request_sum (GtkGridRequest *request,
+ linedata = &priv->linedata[orientation];
+ lines = &request->lines[orientation];
+
+- min = (nonempty - 1) * linedata->spacing;
+- nat = (nonempty - 1) * linedata->spacing;
++ min = 0;
++ nat = 0;
++ if (nonempty > 0)
++ {
++ min = (nonempty - 1) * linedata->spacing;
++ nat = (nonempty - 1) * linedata->spacing;
++ }
+
+ for (i = 0; i < lines->max - lines->min; i++)
+ {
+--
+cgit v0.9.0.2