Chromium Code Reviews| Index: ash/wm/panels/panel_frame_view.cc |
| diff --git a/ash/wm/panels/panel_frame_view.cc b/ash/wm/panels/panel_frame_view.cc |
| index 7a1e31f1fc08fd546c9c348f96cca9c9c75541ae..180eaa09375160ad0e9a3b6d4a2f197f169bbe0f 100644 |
| --- a/ash/wm/panels/panel_frame_view.cc |
| +++ b/ash/wm/panels/panel_frame_view.cc |
| @@ -57,6 +57,15 @@ void PanelFrameView::InitFramePainter() { |
| frame_painter_->Init(frame_, window_icon_, caption_button_container_); |
| } |
| +int PanelFrameView::NonClientTopBorderHeight() const { |
| + if (!frame_painter_) |
| + return 0; |
| + // Reserve enough space to see the buttons and the separator line. |
| + return caption_button_container_->bounds().bottom() + |
| + frame_painter_->HeaderContentSeparatorSize(); |
| +} |
| + |
|
James Cook
2013/10/01 16:00:47
nit: one blank line
|
| + |
| gfx::Size PanelFrameView::GetMinimumSize() { |
| if (!frame_painter_) |
| return gfx::Size(); |
| @@ -124,8 +133,7 @@ gfx::Rect PanelFrameView::GetBoundsForClientView() const { |
| if (!frame_painter_) |
| return bounds(); |
| return frame_painter_->GetBoundsForClientView( |
| - caption_button_container_->bounds().bottom(), |
| - bounds()); |
| + NonClientTopBorderHeight(), bounds()); |
| } |
| gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( |
| @@ -133,7 +141,7 @@ gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( |
| if (!frame_painter_) |
| return client_bounds; |
| return frame_painter_->GetWindowBoundsForClientBounds( |
| - caption_button_container_->bounds().bottom(), client_bounds); |
| + NonClientTopBorderHeight(), client_bounds); |
| } |
| } // namespace ash |