Browse Source

Merge branch 'master' into add-content-presenters-fluent-textbox

pull/4422/head
danwalmsley 6 years ago
committed by GitHub
parent
commit
735895afd7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      native/Avalonia.Native/src/OSX/window.mm

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

@ -27,6 +27,7 @@ public:
AvnPoint lastPositionSet;
NSString* _lastTitle;
IAvnMenu* _mainMenu;
bool _shown;
WindowBaseImpl(IAvnWindowBaseEvents* events, IAvnGlContext* gl)
@ -230,6 +231,29 @@ public:
{
@autoreleasepool
{
auto maxSize = [Window maxSize];
auto minSize = [Window minSize];
if (x < minSize.width)
{
x = minSize.width;
}
if (y < minSize.height)
{
y = minSize.height;
}
if (x > maxSize.width)
{
x = maxSize.width;
}
if (y > maxSize.height)
{
y = maxSize.height;
}
[Window setContentSize:NSSize{x, y}];
return S_OK;

Loading…
Cancel
Save