summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 06:55:00 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 06:55:00 +0000
commitb03018273e444d856eaeef5d2b8d2f4bb0520cab (patch)
tree848194909bb6e1eccdc1a7c5ba053d74f60d77d1 /ash
parent671b681281d2458c1f4e3770c9d8e94755a8ae17 (diff)
downloadchromium_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.cc13
-rw-r--r--ash/wm/panels/panel_frame_view.h3
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(