Chromium Code Reviews| 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 8ee242e323b85ba5d8459730c45a8a173a6fd557..566e02a2a1c9d0190498c0bf7b63849099527f66 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 |
| @@ -7,6 +7,7 @@ |
| #include "base/logging.h" |
| #include "base/mac/foundation_util.h" |
| #include "base/mac/mac_logging.h" |
| +#include "chrome/browser/search/search.h" |
| #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" |
| #import "chrome/browser/ui/cocoa/location_bar/button_decoration.h" |
| #import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" |
| @@ -19,8 +20,6 @@ using extensions::FeatureSwitch; |
| namespace { |
| -const CGFloat kBaselineAdjust = 3.0; |
| - |
| // Matches the clipping radius of |GradientButtonCell|. |
| const CGFloat kCornerRadius = 3.0; |
| @@ -216,8 +215,14 @@ size_t CalculatePositionsInFrame( |
| @implementation AutocompleteTextFieldCell |
| -- (CGFloat)baselineAdjust { |
| - return kBaselineAdjust; |
| +- (CGFloat)topTextFrameOffset { |
| + if (chrome::IsInstantExtendedAPIEnabled()) |
| + return 2.0; |
| + return 3.0; |
| +} |
| + |
| +- (CGFloat)bottomTextFrameOffset { |
| + return 3.0; |
| } |
| - (CGFloat)cornerRadius { |
| @@ -233,6 +238,12 @@ size_t CalculatePositionsInFrame( |
| return YES; |
| } |
| +- (CGFloat)lineHeight { |
| + if (chrome::IsInstantExtendedAPIEnabled()) |
| + return 19; |
| + return 16; |
|
Scott Hess - ex-Googler
2013/05/23 20:08:02
Per offline discussion, this is kinda fine, except
sail
2013/05/23 20:45:44
Unfortunately I couldn't find anyway to derive the
|
| +} |
| + |
| - (void)clearDecorations { |
| leftDecorations_.clear(); |
| rightDecorations_.clear(); |