| Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
|
| index bfd36c11934ffeafa2f50d92b86e64fe6c527eb3..7e7e900e6fa5d787848f896f4e20264ce44caa49 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
|
| @@ -36,7 +36,10 @@ const CGFloat kRightDecorationXOffset = 2.0;
|
| const CGFloat kLeftDecorationXOffset = 1.0;
|
|
|
| // How much the text frame needs to overlap the rightmost left decoration.
|
| -const CGFloat kTextFrameDecorationOverlap = 5.0;
|
| +const CGFloat kTextFrameDecorationOverlap = 4.0;
|
| +
|
| +// How much the text in the cell should be offset from its left.
|
| +const CGFloat kTitleFrameXOffset = 1.0;
|
|
|
| // How long to wait for mouse-up on the location icon before assuming
|
| // that the user wants to drag.
|
| @@ -395,7 +398,15 @@ size_t CalculatePositionsInFrame(
|
|
|
| // Superclass draws text portion WRT original |cellFrame|.
|
| ui::ScopedCGContextSmoothFonts fontSmoothing;
|
| - [super drawInteriorWithFrame:cellFrame inView:controlView];
|
| + NSAttributedString* attrString = self.attributedStringValue;
|
| + [attrString drawInRect:[self titleRectForBounds:cellFrame]];
|
| +}
|
| +
|
| +- (NSRect)titleRectForBounds:(NSRect)rect {
|
| + NSRect titleRect = [super titleRectForBounds:rect];
|
| + titleRect.origin.x += kTitleFrameXOffset;
|
| + titleRect.size.width -= kTitleFrameXOffset;
|
| + return titleRect;
|
| }
|
|
|
| - (BOOL)canDropAtLocationInWindow:(NSPoint)location
|
|
|