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

Unified Diff: chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm

Issue 2478673002: [Mac] Hover/Pressed background for the Omnibox decorations (Closed)
Patch Set: nit Created 4 years, 1 month 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/location_bar/location_icon_decoration.mm ('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/location_bar/security_state_bubble_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
index c6fe3eee02af325d14ef9a23e28905314d196696..6ec3fd959f57e9a5ceccfd1d3fc96f7f57effea0 100644
--- a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
@@ -227,19 +227,21 @@ void SecurityStateBubbleDecoration::DrawInFrame(NSRect frame,
[text drawInRect:text_rect];
// Draw the divider.
- NSBezierPath* line = [NSBezierPath bezierPath];
- [line setLineWidth:line_width];
- [line moveToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
- NSMinY(decoration_frame))];
- [line lineToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
- NSMaxY(decoration_frame))];
-
- NSColor* divider_color = GetDividerColor(in_dark_mode);
- CGFloat divider_alpha =
- [divider_color alphaComponent] * GetAnimationProgress();
- divider_color = [divider_color colorWithAlphaComponent:divider_alpha];
- [divider_color set];
- [line stroke];
+ if (state() == LocationBarDecorationState::NORMAL) {
+ NSBezierPath* line = [NSBezierPath bezierPath];
+ [line setLineWidth:line_width];
+ [line moveToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
+ NSMinY(decoration_frame))];
+ [line lineToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
+ NSMaxY(decoration_frame))];
+
+ NSColor* divider_color = GetDividerColor(in_dark_mode);
+ CGFloat divider_alpha =
+ [divider_color alphaComponent] * GetAnimationProgress();
+ divider_color = [divider_color colorWithAlphaComponent:divider_alpha];
+ [divider_color set];
+ [line stroke];
+ }
}
}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698