aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GenericStack.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-07 16:05:51 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-07 16:05:51 +0100
commit882f6d3c9c9da32050e2da3a09f1b8f91c108699 (patch)
treeb5c93b8460887fc973b0ff485b8f5bbd8f18bd76 /src/GraphicObjects/GenericStack.cs
parentbb765b7d1be5442f99a974b14681951403d85f61 (diff)
debug stack sizing with linq returning neg value
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
-rw-r--r--src/GraphicObjects/GenericStack.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs
index 587f86dc..181c41c2 100644
--- a/src/GraphicObjects/GenericStack.cs
+++ b/src/GraphicObjects/GenericStack.cs
@@ -80,8 +80,7 @@ namespace Crow
}
protected override int measureRawSize (LayoutingType lt)
{
- int totSpace = Spacing * (Children.Count (c => c.Visible) - 1);
-
+ int totSpace = Math.Max(0, Spacing * (Children.Count (c => c.Visible) - 1));
if (lt == LayoutingType.Width) {
if (Orientation == Orientation.Horizontal)
return contentSize.Width + totSpace + 2 * Margin;