window: adding setBounds and getBounds api
This commit is contained in:
parent
4608f5e9cd
commit
ae6a1b409f
8 changed files with 54 additions and 0 deletions
|
@ -470,6 +470,15 @@ bool NativeWindowMac::IsFullscreen() const {
|
|||
return [window_ styleMask] & NSFullScreenWindowMask;
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetBounds(const gfx::Rect& bounds) {
|
||||
Move(bounds);
|
||||
}
|
||||
|
||||
gfx::Rect NativeWindowMac::GetBounds() {
|
||||
return gfx::Rect(GetPosition(),
|
||||
GetSize());
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetSize(const gfx::Size& size) {
|
||||
NSRect frame = [window_ frame];
|
||||
frame.origin.y -= size.height() - frame.size.height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue