Browse Source

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

pull/5767/head
Steven Kirk 5 years ago
committed by GitHub
parent
commit
50e098a25f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      native/Avalonia.Native/src/OSX/window.mm
  2. 5
      src/Avalonia.Controls/RelativePanel.cs

4
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

5
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;

Loading…
Cancel
Save