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..1a095208379cd0cc6fccb7a07a176edcfc7f9aaa 100644 |
--- a/ash/wm/panels/panel_frame_view.cc |
+++ b/ash/wm/panels/panel_frame_view.cc |
@@ -57,6 +57,13 @@ void PanelFrameView::InitFramePainter() { |
frame_painter_->Init(frame_, window_icon_, caption_button_container_); |
} |
+int PanelFrameView::NonClientTopBorderHeight() const { |
+ // Reserve enough space to see the buttons and the separator line. |
flackr
2013/09/30 20:20:26
Perhaps DCHECK(frame_painter_) or have an early ex
pkotwicz
2013/10/01 15:55:04
Thanks for pointing this out!
|
+ return caption_button_container_->bounds().bottom() + |
+ frame_painter_->HeaderContentSeparatorSize(); |
+} |
+ |
+ |
gfx::Size PanelFrameView::GetMinimumSize() { |
if (!frame_painter_) |
return gfx::Size(); |
@@ -124,7 +131,7 @@ gfx::Rect PanelFrameView::GetBoundsForClientView() const { |
if (!frame_painter_) |
return bounds(); |
return frame_painter_->GetBoundsForClientView( |
- caption_button_container_->bounds().bottom(), |
+ NonClientTopBorderHeight(), |
bounds()); |
flackr
2013/09/30 20:20:26
nit: don't wrap.
|
} |
@@ -133,7 +140,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 |