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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_view.mm

Issue 10574036: mac: Don't let background tab highlight bleed into tabstrip border. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lodpi Created 8 years, 6 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/cocoa/tabs/tab_view.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm
index 13a5e1d0d8528fb0ee06ce2e2d2451473a1c0406..aaa4783a6a9b1c9eb1edde5e3ff4481fe1596baf 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm
@@ -357,14 +357,18 @@ const CGFloat kRapidCloseDist = 2.5;
// Draw the top inner highlight within the tab if using the default theme.
if (themeProvider && themeProvider->UsingDefaultTheme()) {
+ [highlightColor setStroke];
+ scoped_nsobject<NSBezierPath> highlightPath([path copy]);
+ [highlightPath setLineWidth:lineWidth];
+
+ if (!selected)
+ NSRectClip(NSOffsetRect(rect, 0, 2 * lineWidth));
+
NSAffineTransform* highlightTransform = [NSAffineTransform transform];
[highlightTransform translateXBy:lineWidth yBy:-lineWidth];
-
- scoped_nsobject<NSBezierPath> highlightPath([path copy]);
[highlightPath transformUsingAffineTransform:highlightTransform];
- [highlightColor setStroke];
- [highlightPath setLineWidth:lineWidth];
[highlightPath stroke];
+
highlightTransform = [NSAffineTransform transform];
[highlightTransform translateXBy:-2 * lineWidth yBy:0.0];
[highlightPath transformUsingAffineTransform:highlightTransform];
« 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