Implement size and position APIs with bounds API
This commit is contained in:
parent
7142cae041
commit
0d4d2080ca
6 changed files with 23 additions and 65 deletions
|
@ -237,6 +237,22 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
|||
Show();
|
||||
}
|
||||
|
||||
void NativeWindow::SetSize(const gfx::Size& size) {
|
||||
SetBounds(gfx::Rect(GetPosition(), size));
|
||||
}
|
||||
|
||||
gfx::Size NativeWindow::GetSize() {
|
||||
return GetBounds().size();
|
||||
}
|
||||
|
||||
void NativeWindow::SetPosition(const gfx::Point& position) {
|
||||
SetBounds(gfx::Rect(position, GetSize()));
|
||||
}
|
||||
|
||||
gfx::Point NativeWindow::GetPosition() {
|
||||
return GetBounds().origin();
|
||||
}
|
||||
|
||||
void NativeWindow::SetRepresentedFilename(const std::string& filename) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue