Use current content position when adjusting content size

This commit is contained in:
Kevin Sawicki 2016-08-04 11:41:32 -07:00
parent a190495df3
commit 5681ee5220

View file

@ -219,7 +219,9 @@ gfx::Point NativeWindow::GetPosition() {
} }
void NativeWindow::SetContentSize(const gfx::Size& size, bool animate) { void NativeWindow::SetContentSize(const gfx::Size& size, bool animate) {
SetSize(ContentBoundsToWindowBounds(gfx::Rect(size)).size(), animate); gfx::Rect bounds = GetContentBounds();
bounds.set_size(size);
SetSize(ContentBoundsToWindowBounds(bounds).size(), animate);
} }
gfx::Size NativeWindow::GetContentSize() { gfx::Size NativeWindow::GetContentSize() {