Index: chrome/browser/ui/cocoa/gradient_button_cell.mm |
diff --git a/chrome/browser/ui/cocoa/gradient_button_cell.mm b/chrome/browser/ui/cocoa/gradient_button_cell.mm |
index 796de611e89b7efbb4e8391c65bff47f5bfb68e0..1958781532d3d1ed16b94dd92db979aa2ea7952d 100644 |
--- a/chrome/browser/ui/cocoa/gradient_button_cell.mm |
+++ b/chrome/browser/ui/cocoa/gradient_button_cell.mm |
@@ -593,18 +593,25 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4; |
// Stroke the borders and appropriate fill gradient. If we're borderless, the |
// only time we want to draw the inner gradient is if we're highlighted or if |
- // we're drawing the focus ring manually. |
+ // we're drawing the focus ring manually. In Material Design, the "border" |
+ // actually a highlight, which should be drawn if |
shrike
2016/07/08 22:19:19
nit: I think you mean it to read "is actually a hi
spqchan
2016/07/08 23:45:03
Done.
|
+ // |showsBorderOnlyWhileMouseInside| is true. |
+ BOOL hasMaterialHighlight = |
+ [self tag] == kMaterialStandardButtonTypeWithLimitedClickFeedback && |
+ ![self showsBorderOnlyWhileMouseInside]; |
if (([self isBordered] && ![self showsBorderOnlyWhileMouseInside]) || |
- pressed || [self isMouseInside] || [self isContinuousPulsing]) { |
+ pressed || [self isMouseInside] || [self isContinuousPulsing] || |
+ hasMaterialHighlight) { |
// When pulsing we want the bookmark to stand out a little more. |
BOOL showClickedGradient = pressed || |
(pulseState_ == gradient_button_cell::kPulsingContinuous); |
+ BOOL showHighlightGradient = [self isHighlighted] || hasMaterialHighlight; |
[self drawBorderAndFillForTheme:themeProvider |
controlView:controlView |
innerPath:innerPath |
showClickedGradient:showClickedGradient |
- showHighlightGradient:[self isHighlighted] |
+ showHighlightGradient:showHighlightGradient |
hoverAlpha:[self hoverAlpha] |
active:active |
cellFrame:cellFrame |