Commit 87bb820f authored by shrike's avatar shrike Committed by Commit bot

[Mac][Material Design] Adjust incognito hover glow.

As requested by sgabriel@, this cl reduces the hover "glow" when mousing
over an incognito tab.

R=avi@chromium.org
BUG=632160

Review-Url: https://codereview.chromium.org/2506843002
Cr-Commit-Position: refs/heads/master@{#434766}
parent 77c90085
......@@ -47,6 +47,10 @@ const NSTimeInterval kAlertHideDuration = 0.4;
// increasing/decreasing).
const NSTimeInterval kGlowUpdateInterval = 0.025;
// The intensity of the white overlay when hovering the mouse over a tab.
const CGFloat kMouseHoverWhiteValue = 1.0;
const CGFloat kMouseHoverWhiteValueIncongito = 0.3;
// This is used to judge whether the mouse has moved during rapid closure; if it
// has moved less than the threshold, we want to close the tab.
const CGFloat kRapidCloseDist = 2.5;
......@@ -479,10 +483,9 @@ CGFloat LineWidthFromContext(CGContextRef context) {
// Draw a mouse hover gradient for the default themes.
if (hoverAlpha > 0) {
if (themeProvider && !hasCustomTheme) {
CGFloat whiteValue = 1;
// In Incognito mode, give the glow a darker value.
CGFloat whiteValue = kMouseHoverWhiteValue;
if (themeProvider && themeProvider->InIncognitoMode()) {
whiteValue = 0.5;
whiteValue = kMouseHoverWhiteValueIncongito;
}
base::scoped_nsobject<NSGradient> glow([NSGradient alloc]);
[glow initWithStartingColor:[NSColor colorWithCalibratedWhite:whiteValue
......
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