]> O.S.I.I.S - jp/crow.git/commitdiff
add fit first
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 16 Mar 2018 13:24:19 +0000 (14:24 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 18 Mar 2018 14:52:57 +0000 (15:52 +0100)
src/GraphicObjects/Group.cs

index c8bf3f651314b31c59f64b1dde056b2500b2a460..bb3078f39fa8e1b97eaa227f675215c8293ee7ed 100644 (file)
@@ -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;
+                               }
                                //}
                        }
                }