Index: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm |
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm |
index df7b00d3bc6b1c315e1189e80962b1cd23eb322c..79fc749070a0ebae46aada0c05123fd34325ec33 100644 |
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm |
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm |
@@ -23,6 +23,10 @@ |
namespace { |
+// How much to adjust the cell sizing up from the default determined |
+// by the font. |
+const CGFloat kCellHeightAdjust = 6.0; |
+ |
// How far to offset image column from the left. |
const CGFloat kImageXOffset = 5.0; |
@@ -205,6 +209,23 @@ NSAttributedString* CreateClassifiedAttributedString( |
} |
} |
+- (id)copyWithZone:(NSZone*)zone { |
+ OmniboxPopupCell* copy = [super copyWithZone:zone]; |
+ copy->match_ = match_; |
+ copy->separator_.reset([separator_ copy]); |
+ copy->description_.reset([description_ copy]); |
+ copy->prefix_.reset([prefix_ copy]); |
+ copy->maxMatchContentsWidth_ = maxMatchContentsWidth_; |
+ copy->contentsOffset_ = contentsOffset_; |
+ return copy; |
+} |
+ |
+- (NSRect)drawingRectForBounds:(NSRect)theRect { |
+ // Enlarge the cell size. |
shrike
2015/04/27 18:30:10
Do you mean decrease the cell size?
dschuyler
2015/05/01 21:50:53
Done.
|
+ theRect.size.height -= kCellHeightAdjust; |
+ return theRect; |
+} |
+ |
- (void)setMaxMatchContentsWidth:(CGFloat)maxMatchContentsWidth { |
maxMatchContentsWidth_ = maxMatchContentsWidth; |
} |