Browse Source

set the content before Show is called, so that contentview is set after the size has been set.

pull/5963/head
Dan Walmsley 5 years ago
parent
commit
30035f3134
  1. 4
      native/Avalonia.Native/src/OSX/window.mm

4
native/Avalonia.Native/src/OSX/window.mm

@ -50,7 +50,6 @@ public:
[Window setBackingType:NSBackingStoreBuffered]; [Window setBackingType:NSBackingStoreBuffered];
[Window setOpaque:false]; [Window setOpaque:false];
[Window setContentView: StandardContainer];
} }
virtual HRESULT ObtainNSWindowHandle(void** ret) override virtual HRESULT ObtainNSWindowHandle(void** ret) override
@ -112,6 +111,9 @@ public:
{ {
SetPosition(lastPositionSet); SetPosition(lastPositionSet);
UpdateStyle(); UpdateStyle();
[Window setContentView: StandardContainer];
if(ShouldTakeFocusOnShow() && activate) if(ShouldTakeFocusOnShow() && activate)
{ {
[Window makeKeyAndOrderFront:Window]; [Window makeKeyAndOrderFront:Window];

Loading…
Cancel
Save