Forgot to add this in previous; from upstream:

Fix natural/min widht calculations for empty grids

https://bugzilla.gnome.org/show_bug.cgi?id=660139
This commit is contained in:
ajacoutot 2011-12-29 14:51:16 +00:00
parent 636c44737f
commit ae06859d56
2 changed files with 28 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.31 2011/12/29 14:12:31 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.32 2011/12/29 14:51:16 ajacoutot Exp $
SHARED_ONLY= Yes
@ -14,6 +14,8 @@ PKGNAME-main= gtk+3-${V}
PKGNAME-docs= gtk+3-docs-${V}
PKGNAME-cups= gtk+3-cups-${V}
REVISION-main= 0
# grep ^GTK_BINARY_VERSION ${WRKSRC}/Makefile (after do-configure)
GTK_BINARY_VERSION=3.0.0
SUBST_VARS= GTK_BINARY_VERSION

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-gtk_gtkgrid_c,v 1.1 2011/12/29 14:51:16 ajacoutot Exp $
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
--- gtk/gtkgrid.c.orig Mon Dec 19 14:58:28 2011
+++ gtk/gtkgrid.c Thu Dec 29 15:29:44 2011
@@ -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++)
{