diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-02 06:55:00 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-02 06:55:00 +0000 |
commit | b03018273e444d856eaeef5d2b8d2f4bb0520cab (patch) | |
tree | 848194909bb6e1eccdc1a7c5ba053d74f60d77d1 /ash | |
parent | 671b681281d2458c1f4e3770c9d8e94755a8ae17 (diff) | |
download | chromium_src-b03018273e444d856eaeef5d2b8d2f4bb0520cab.zip chromium_src-b03018273e444d856eaeef5d2b8d2f4bb0520cab.tar.gz chromium_src-b03018273e444d856eaeef5d2b8d2f4bb0520cab.tar.bz2 |
This CL:
- Makes the content edge visible for restored v1 apps
- Makes the PanelFrameView header height the same as that for CustomFrameViewAsh
BUG=301865
TEST=Manual, see bug
Review URL: https://codereview.chromium.org/25270004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/panels/panel_frame_view.cc | 13 | ||||
-rw-r--r-- | ash/wm/panels/panel_frame_view.h | 3 |
2 files changed, 13 insertions, 3 deletions
diff --git a/ash/wm/panels/panel_frame_view.cc b/ash/wm/panels/panel_frame_view.cc index 7a1e31f..2b99b2a 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 diff --git a/ash/wm/panels/panel_frame_view.h b/ash/wm/panels/panel_frame_view.h index cccfd18..436ba4a 100644 --- a/ash/wm/panels/panel_frame_view.h +++ b/ash/wm/panels/panel_frame_view.h @@ -41,6 +41,9 @@ class ASH_EXPORT PanelFrameView : public views::NonClientFrameView { private: void InitFramePainter(); + // Height from top of window to top of client area. + int NonClientTopBorderHeight() const; + // Overridden from views::NonClientFrameView: virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; virtual gfx::Rect GetWindowBoundsForClientBounds( |