diff --git a/atom/browser/ui/views/frameless_view.cc b/atom/browser/ui/views/frameless_view.cc index 2ec4459f6b45..5182e1a0f7f1 100644 --- a/atom/browser/ui/views/frameless_view.cc +++ b/atom/browser/ui/views/frameless_view.cc @@ -98,7 +98,7 @@ void FramelessView::UpdateWindowTitle() { void FramelessView::SizeConstraintsChanged() { } -gfx::Size FramelessView::GetPreferredSize() const { +gfx::Size FramelessView::CalculatePreferredSize() const { return frame_->non_client_view()->GetWindowBoundsForClientBounds( gfx::Rect(frame_->client_view()->GetPreferredSize())).size(); } diff --git a/atom/browser/ui/views/frameless_view.h b/atom/browser/ui/views/frameless_view.h index 54dc3285fabc..112972c318ca 100644 --- a/atom/browser/ui/views/frameless_view.h +++ b/atom/browser/ui/views/frameless_view.h @@ -39,7 +39,7 @@ class FramelessView : public views::NonClientFrameView { void SizeConstraintsChanged() override; // Overridden from View: - gfx::Size GetPreferredSize() const override; + gfx::Size CalculatePreferredSize() const override; gfx::Size GetMinimumSize() const override; gfx::Size GetMaximumSize() const override; const char* GetClassName() const override;