| Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| index 41e190060eda3e854d075feaf99a398783ea383b..1172aab7e7befebdc6044a0023991f8606bfc091 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| @@ -173,13 +173,25 @@ const SkColor kMaterialDarkVectorIconColor = SK_ColorWHITE;
|
| }
|
|
|
| + (void)drawLocationBarIconHTTPForScale:(int)scaleFactor {
|
| - NSBezierPath* circlePath =
|
| - [NSBezierPath bezierPathWithOvalInRect:NSMakeRect(2, 2, 12, 12)];
|
| - [circlePath setLineWidth:1.5];
|
| - [circlePath stroke];
|
| -
|
| - NSRectFill(NSMakeRect(7, 4, 2, 5));
|
| - NSRectFill(NSMakeRect(7, 10, 2, 2));
|
| + if (scaleFactor > 1) {
|
| + NSRect ovalRect = NSMakeRect(2.25, 1.75, 12, 12);
|
| + NSBezierPath* circlePath =
|
| + [NSBezierPath bezierPathWithOvalInRect:ovalRect];
|
| + [circlePath setLineWidth:1.5];
|
| + [circlePath stroke];
|
| +
|
| + NSRectFill(NSMakeRect(7.5, 4.5, 1.5, 4));
|
| + NSRectFill(NSMakeRect(7.5, 9.5, 1.5, 1.5));
|
| + } else {
|
| + NSRect ovalRect = NSMakeRect(2, 2, 12, 12);
|
| + NSBezierPath* circlePath =
|
| + [NSBezierPath bezierPathWithOvalInRect:ovalRect];
|
| + [circlePath setLineWidth:1.5];
|
| + [circlePath stroke];
|
| +
|
| + NSRectFill(NSMakeRect(7, 4, 2, 5));
|
| + NSRectFill(NSMakeRect(7, 10, 2, 2));
|
| + }
|
| }
|
|
|
| + (void)drawLocationBarIconHTTPSInvalidForScale:(int)scaleFactor {
|
| @@ -222,10 +234,17 @@ const SkColor kMaterialDarkVectorIconColor = SK_ColorWHITE;
|
| }
|
|
|
| + (void)drawLocationBarIconHTTPSValidForScale:(int)scaleFactor {
|
| + NSAffineTransform* transform = [NSAffineTransform transform];
|
| + // Adjust down 1px in Retina, so that the lock sits on the text baseline.
|
| + if (scaleFactor > 1) {
|
| + [transform translateXBy:0 yBy:-0.5];
|
| + }
|
| +
|
| NSBezierPath* rectPath =
|
| [NSBezierPath bezierPathWithRoundedRect:NSMakeRect(4, 3, 8, 7)
|
| xRadius:1
|
| yRadius:1];
|
| + [rectPath transformUsingAffineTransform:transform];
|
| [rectPath fill];
|
|
|
| NSBezierPath* curvePath = [NSBezierPath bezierPath];
|
| @@ -239,6 +258,7 @@ const SkColor kMaterialDarkVectorIconColor = SK_ColorWHITE;
|
| controlPoint2:NSMakePoint(10.5, 13)];
|
| [curvePath lineToPoint:NSMakePoint(10.5, 9.75)];
|
| [curvePath setLineWidth:1.25];
|
| + [curvePath transformUsingAffineTransform:transform];
|
| [curvePath stroke];
|
| }
|
|
|
|
|