| 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 09733c3a3656b8f6d8bc699f649523d49fbaa1e6..3657ca602293a0269140473c09d903884e32137d 100644
|
| --- a/chrome/browser/ui/cocoa/tabs/tab_view.mm
|
| +++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm
|
| @@ -24,8 +24,6 @@
|
| @end
|
| #endif
|
|
|
| -namespace {
|
| -
|
| const int kMaskHeight = 29; // Height of the mask bitmap.
|
| const int kFillHeight = 25; // Height of the "mask on" part of the mask bitmap.
|
|
|
| @@ -52,8 +50,6 @@ const NSTimeInterval kGlowUpdateInterval = 0.025;
|
| // has moved less than the threshold, we want to close the tab.
|
| const CGFloat kRapidCloseDist = 2.5;
|
|
|
| -} // namespace
|
| -
|
| @interface TabView(Private)
|
|
|
| - (void)resetLastGlowUpdateTime;
|
| @@ -327,6 +323,11 @@ const CGFloat kRapidCloseDist = 2.5;
|
|
|
| bool selected = [self state];
|
|
|
| + // Background tabs should not paint over the tab strip separator, which is
|
| + // two pixels high in both lodpi and hidpi.
|
| + if (!selected && dirtyRect.origin.y < 1)
|
| + dirtyRect.origin.y = 2 * [self cr_lineWidth];
|
| +
|
| bool usingDefaultTheme = themeProvider && themeProvider->UsingDefaultTheme();
|
| NSColor* backgroundImageColor = [self backgroundColorForSelected:selected];
|
|
|
| @@ -405,6 +406,9 @@ const CGFloat kRapidCloseDist = 2.5;
|
|
|
| // Draws the tab outline.
|
| - (void)drawStroke:(NSRect)dirtyRect {
|
| + BOOL focused = [[self window] isKeyWindow] || [[self window] isMainWindow];
|
| + CGFloat alpha = focused ? 1.0 : tabs::kImageNoFocusAlpha;
|
| +
|
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| float height =
|
| [rb.GetNativeImageNamed(IDR_TAB_ACTIVE_LEFT).ToNSImage() size].height;
|
| @@ -415,7 +419,7 @@ const CGFloat kRapidCloseDist = 2.5;
|
| rb.GetNativeImageNamed(IDR_TAB_ACTIVE_RIGHT).ToNSImage(),
|
| /*vertical=*/NO,
|
| NSCompositeSourceOver,
|
| - 1.0,
|
| + alpha,
|
| /*flipped=*/NO);
|
| } else {
|
| NSDrawThreePartImage(NSMakeRect(0, 0, NSWidth([self bounds]), height),
|
| @@ -424,7 +428,7 @@ const CGFloat kRapidCloseDist = 2.5;
|
| rb.GetNativeImageNamed(IDR_TAB_INACTIVE_RIGHT).ToNSImage(),
|
| /*vertical=*/NO,
|
| NSCompositeSourceOver,
|
| - 1.0,
|
| + alpha,
|
| /*flipped=*/NO);
|
| }
|
| }
|
|
|