Merge pull request #4112 from evgenyzinoviev/resize-animate-pr
Animate window resizing on OS X
This commit is contained in:
commit
712f11a9a3
9 changed files with 50 additions and 36 deletions
|
@ -581,7 +581,7 @@ bool NativeWindowMac::IsFullscreen() const {
|
|||
return [window_ styleMask] & NSFullScreenWindowMask;
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetBounds(const gfx::Rect& bounds) {
|
||||
void NativeWindowMac::SetBounds(const gfx::Rect& bounds, bool animate) {
|
||||
NSRect cocoa_bounds = NSMakeRect(bounds.x(), 0,
|
||||
bounds.width(),
|
||||
bounds.height());
|
||||
|
@ -590,7 +590,7 @@ void NativeWindowMac::SetBounds(const gfx::Rect& bounds) {
|
|||
cocoa_bounds.origin.y =
|
||||
NSHeight([screen frame]) - bounds.height() - bounds.y();
|
||||
|
||||
[window_ setFrame:cocoa_bounds display:YES];
|
||||
[window_ setFrame:cocoa_bounds display:YES animate:animate];
|
||||
}
|
||||
|
||||
gfx::Rect NativeWindowMac::GetBounds() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue