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

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: 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..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
« 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