Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1029)

Unified Diff: ash/wm/panels/panel_frame_view.cc

Issue 25270004: Fix bugs wrt to the content edge for v1 apps and panels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit as per jamescook@ Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..2b99b2a6a7cfb1a16397d03f19cd967e0fb878f0 100644
--- a/ash/wm/panels/panel_frame_view.cc
+++ b/ash/wm/panels/panel_frame_view.cc
@@ -57,6 +57,14 @@ 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();
+}
+
gfx::Size PanelFrameView::GetMinimumSize() {
if (!frame_painter_)
return gfx::Size();
@@ -124,8 +132,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 +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
« no previous file with comments | « ash/wm/panels/panel_frame_view.h ('k') | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698