mirror of
https://github.com/electron/electron.git
synced 2026-02-15 09:35:34 -05:00
adds invalidate method and proper resizing
This commit is contained in:
@@ -205,6 +205,10 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
||||
|
||||
void NativeWindow::SetSize(const gfx::Size& size, bool animate) {
|
||||
SetBounds(gfx::Rect(GetPosition(), size), animate);
|
||||
|
||||
const auto view = web_contents()->GetRenderWidgetHostView();
|
||||
if (view)
|
||||
view->SetSize(size);
|
||||
}
|
||||
|
||||
gfx::Size NativeWindow::GetSize() {
|
||||
|
||||
Reference in New Issue
Block a user