diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-07 16:05:51 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-07 16:05:51 +0100 |
| commit | bdb23e49cbaa3ada4e140993796deded92f1e761 (patch) | |
| tree | 71010c89f8732690e6906fc1dbb85e792bc3ae62 | |
| parent | 6c152b554e65b5cb5f4cf6521d65d94b8fdc28cc (diff) | |
debug stack sizing with linq returning neg value
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 3 |
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; |