Use current content position when adjusting content size
This commit is contained in:
parent
a190495df3
commit
5681ee5220
1 changed files with 3 additions and 1 deletions
|
@ -219,7 +219,9 @@ gfx::Point NativeWindow::GetPosition() {
|
|||
}
|
||||
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue