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
|
@ -338,16 +338,20 @@ bool Window::IsFullscreen() {
|
|||
return window_->IsFullscreen();
|
||||
}
|
||||
|
||||
void Window::SetBounds(const gfx::Rect& bounds) {
|
||||
window_->SetBounds(bounds);
|
||||
void Window::SetBounds(const gfx::Rect& bounds, mate::Arguments* args) {
|
||||
bool animate = false;
|
||||
args->GetNext(&animate);
|
||||
window_->SetBounds(bounds, animate);
|
||||
}
|
||||
|
||||
gfx::Rect Window::GetBounds() {
|
||||
return window_->GetBounds();
|
||||
}
|
||||
|
||||
void Window::SetSize(int width, int height) {
|
||||
window_->SetSize(gfx::Size(width, height));
|
||||
void Window::SetSize(int width, int height, mate::Arguments* args) {
|
||||
bool animate = false;
|
||||
args->GetNext(&animate);
|
||||
window_->SetSize(gfx::Size(width, height), animate);
|
||||
}
|
||||
|
||||
std::vector<int> Window::GetSize() {
|
||||
|
@ -358,8 +362,10 @@ std::vector<int> Window::GetSize() {
|
|||
return result;
|
||||
}
|
||||
|
||||
void Window::SetContentSize(int width, int height) {
|
||||
window_->SetContentSize(gfx::Size(width, height));
|
||||
void Window::SetContentSize(int width, int height, mate::Arguments* args) {
|
||||
bool animate = false;
|
||||
args->GetNext(&animate);
|
||||
window_->SetContentSize(gfx::Size(width, height), animate);
|
||||
}
|
||||
|
||||
std::vector<int> Window::GetContentSize() {
|
||||
|
@ -414,8 +420,10 @@ void Window::Center() {
|
|||
window_->Center();
|
||||
}
|
||||
|
||||
void Window::SetPosition(int x, int y) {
|
||||
window_->SetPosition(gfx::Point(x, y));
|
||||
void Window::SetPosition(int x, int y, mate::Arguments* args) {
|
||||
bool animate = false;
|
||||
args->GetNext(&animate);
|
||||
window_->SetPosition(gfx::Point(x, y), animate);
|
||||
}
|
||||
|
||||
std::vector<int> Window::GetPosition() {
|
||||
|
|
|
@ -94,11 +94,11 @@ class Window : public mate::TrackableObject<Window>,
|
|||
bool IsMinimized();
|
||||
void SetFullScreen(bool fullscreen);
|
||||
bool IsFullscreen();
|
||||
void SetBounds(const gfx::Rect& bounds);
|
||||
void SetBounds(const gfx::Rect& bounds, mate::Arguments* args);
|
||||
gfx::Rect GetBounds();
|
||||
void SetSize(int width, int height);
|
||||
void SetSize(int width, int height, mate::Arguments* args);
|
||||
std::vector<int> GetSize();
|
||||
void SetContentSize(int width, int height);
|
||||
void SetContentSize(int width, int height, mate::Arguments* args);
|
||||
std::vector<int> GetContentSize();
|
||||
void SetMinimumSize(int width, int height);
|
||||
std::vector<int> GetMinimumSize();
|
||||
|
@ -109,7 +109,7 @@ class Window : public mate::TrackableObject<Window>,
|
|||
void SetAlwaysOnTop(bool top);
|
||||
bool IsAlwaysOnTop();
|
||||
void Center();
|
||||
void SetPosition(int x, int y);
|
||||
void SetPosition(int x, int y, mate::Arguments* args);
|
||||
std::vector<int> GetPosition();
|
||||
void SetTitle(const std::string& title);
|
||||
std::string GetTitle();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue