mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
Use current content position when adjusting content size
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user