Browse Source

Merge branch 'master' into fix-grid-splitter-resize

Steven Kirk 4 years ago
parent
commit
50e098a25f

+ 4 - 0
native/Avalonia.Native/src/OSX/window.mm

@@ -1936,6 +1936,10 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
         
         [NSApp setMenu:_menu];
     }
+    else
+    {
+        [self showAppMenuOnly];
+    }
 }
 
 -(void) showAppMenuOnly

+ 4 - 1
src/Avalonia.Controls/RelativePanel.cs

@@ -55,7 +55,10 @@ namespace Avalonia.Controls
             _childGraph.Measure(availableSize);
 
             _childGraph.Reset(false);
-            var boundingSize = _childGraph.GetBoundingSize(Width.IsNaN(), Height.IsNaN());
+            var calcWidth = Width.IsNaN() && HorizontalAlignment != HorizontalAlignment.Stretch;
+            var calcHeight = Height.IsNaN() && VerticalAlignment != VerticalAlignment.Stretch;
+
+            var boundingSize = _childGraph.GetBoundingSize(calcWidth, calcHeight);
             _childGraph.Reset();
             _childGraph.Measure(boundingSize);
             return boundingSize;