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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc

Issue 8343066: aura: Draw persistent borders around browser windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc
index 723c45bc719874414cd5529c1e2e53e5b3a472b9..58239f34f002a8182be17b82308fbbd94db03720 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc
@@ -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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698