From ca044e13440ffe5b8a768fad1cd8698b2d36cf75 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Fri, 16 Mar 2018 14:24:19 +0100 Subject: [PATCH] add fit first --- src/GraphicObjects/Group.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index c8bf3f65..bb3078f3 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -285,11 +285,23 @@ namespace Crow //if (HeightPolicy == Measure.Fit) { if (tallestChild == null) searchTallestChild (true); + if (tallestChild == null) { + if (Children.Count > 0) + Children [0].Height = Measure.Fit; + else + tallestChild.Height = Measure.Fit; + } //} } else if (lt == LayoutingType.Width) { //if (WidthPolicy == Measure.Fit) { if (largestChild == null) searchLargestChild (true); + if (largestChild == null) { + if (Children.Count > 0) + Children [0].Width = Measure.Fit; + else + largestChild.Width = Measure.Fit; + } //} } } -- 2.47.3