Commit 1fa5a0d1 authored by derat@chromium.org's avatar derat@chromium.org

aura: Draw persistent borders around browser windows.

This makes BrowserNonClientFrameViewAura's translucent gray
background always stick out a bit beyond the sides and
bottom of windows, instead of just peeking out when the user
hovers for resizing.

I originally added a separate view for this, but it looked
strange since Chrome already draws a shadow along the top of
the tab strip.

BUG=101977
TEST=manual

Review URL: http://codereview.chromium.org/8343066

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107823 0039d316-1c4b-4281-b951-d872f2087c98
parent 09e170f5
......@@ -35,6 +35,10 @@ const int kTopBorderThickness = 4;
// background at start of slide-in animation.
const int kFrameBackgroundTopOffset = 25;
// Width of a persistent border that we show around the window (using
// FrameBackground) even when the resize border isn't visible.
const int kPersistentBorderThickness = 2;
// The color used to fill the frame. Opacity is handled in the layer.
const SkColor kFrameColor = SK_ColorBLACK;
// Radius of rounded rectangle corners.
......@@ -301,10 +305,11 @@ gfx::Rect BrowserNonClientFrameViewAura::GetFrameBackgroundBounds(
show_top = true;
gfx::Rect target = bounds();
// Inset the sides that are not showing.
target.Inset((show_left ? 0 : kResizeBorderThickness),
(show_top ? 0 : kTopBorderThickness + kFrameBackgroundTopOffset),
(show_right ? 0 : kResizeBorderThickness),
(show_bottom ? 0 : kResizeBorderThickness));
target.Inset(
(show_left ? 0 : kResizeBorderThickness - kPersistentBorderThickness),
(show_top ? 0 : kTopBorderThickness + kFrameBackgroundTopOffset),
(show_right ? 0 : kResizeBorderThickness - kPersistentBorderThickness),
(show_bottom ? 0 : kResizeBorderThickness - kPersistentBorderThickness));
return target;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment