From 338e82c43d718b4afe1e271633b68d17aa7ea4f5 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Thu, 4 Dec 2014 21:00:30 +0100 Subject: [PATCH] Fixed bug in Grid. Bug came from Moonlight. Fixes #3. --- Perspex.Controls/Grid.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Perspex.Controls/Grid.cs b/Perspex.Controls/Grid.cs index 7b42284758..789c4e06c7 100644 --- a/Perspex.Controls/Grid.cs +++ b/Perspex.Controls/Grid.cs @@ -537,7 +537,7 @@ namespace Perspex.Controls } else { - width = Math.Max(availableSize.Width - this.colMatrix[i, i].OfferedSize, 0); + width = Math.Max(width - this.colMatrix[i, i].OfferedSize, 0); } } @@ -572,7 +572,7 @@ namespace Perspex.Controls } else { - height = Math.Max(availableSize.Height - this.rowMatrix[i, i].OfferedSize, 0); + height = Math.Max(height - this.rowMatrix[i, i].OfferedSize, 0); } }