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

Unified Diff: chrome/browser/ui/cocoa/gradient_button_cell.mm

Issue 1987203003: [Mac][Material Design] Add MD hover to bookmark items in menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uploaded__bookmark_title_baseline_fix
Patch Set: Created 4 years, 7 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 | « chrome/browser/ui/cocoa/gradient_button_cell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9bf413e21bb74a894963fecd8c51e1527e27b28a..fd343289cf48e90ade5615f57be2021c6c1789a5 100644
--- a/chrome/browser/ui/cocoa/gradient_button_cell.mm
+++ b/chrome/browser/ui/cocoa/gradient_button_cell.mm
@@ -546,11 +546,8 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4;
*returnInnerFrame = innerFrame;
if (returnInnerPath) {
DCHECK(*returnInnerPath == nil);
- // In Material Design on Retina, nudge the hover background by 1px.
- if ([self tag] == kMaterialStandardButtonTypeWithLimitedClickFeedback &&
- kLineWidth < 1) {
- drawFrame.origin.y -= kLineWidth;
- }
+ drawFrame.origin.y +=
+ [self hoverBackgroundVerticalOffsetInControlView:controlView];
*returnInnerPath = [NSBezierPath bezierPathWithRoundedRect:drawFrame
xRadius:cornerRadius
@@ -692,6 +689,10 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4;
return 1;
}
+- (CGFloat)hoverBackgroundVerticalOffsetInControlView:(NSView*)controlView {
+ return 0.0;
+}
+
// Overriden from NSButtonCell so we can display a nice fadeout effect for
// button titles that overflow.
// This method is copied in the most part from GTMFadeTruncatingTextFieldCell,
« no previous file with comments | « chrome/browser/ui/cocoa/gradient_button_cell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698