osx: Call setContentMinSize in SetContentSizeConstraints

This commit is contained in:
Cheng Zhao 2015-10-05 20:09:29 +08:00
parent a9b0111c3e
commit d19ead1907

View file

@ -559,11 +559,11 @@ void NativeWindowMac::SetContentSizeConstraints(
NSView* content = [window_ contentView]; NSView* content = [window_ contentView];
if (size_constraints.HasMinimumSize()) { if (size_constraints.HasMinimumSize()) {
NSSize min_size = ToNSSize(size_constraints.GetMinimumSize()); NSSize min_size = ToNSSize(size_constraints.GetMinimumSize());
[window_ setMinSize:[content convertSize:min_size toView:nil]]; [window_ setContentMinSize:[content convertSize:min_size toView:nil]];
} }
if (size_constraints.HasMaximumSize()) { if (size_constraints.HasMaximumSize()) {
NSSize max_size = ToNSSize(size_constraints.GetMaximumSize()); NSSize max_size = ToNSSize(size_constraints.GetMaximumSize());
[window_ setMaxSize:[content convertSize:max_size toView:nil]]; [window_ setContentMaxSize:[content convertSize:max_size toView:nil]];
} }
NativeWindow::SetContentSizeConstraints(size_constraints); NativeWindow::SetContentSizeConstraints(size_constraints);
} }