From ca044e13440ffe5b8a768fad1cd8698b2d36cf75 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Fri, 16 Mar 2018 14:24:19 +0100 Subject: add fit first --- src/GraphicObjects/Group.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') 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; + } //} } } -- cgit v1.3.1-4-g156e