Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| index 2d5fd1269c656e4c5bdc2f229d81f7408f2e86cf..826253fc6c2ed972af57fdf3d39332894de65e3d 100644 |
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| @@ -201,14 +201,18 @@ void LocationBarView::Init() { |
| gfx::FontList font_list = ResourceBundle::GetSharedInstance().GetFontList( |
| ResourceBundle::BaseFont); |
| const int current_font_size = font_list.GetFontSize(); |
| - const int desired_font_size = browser_defaults::kOmniboxFontPixelSize; |
|
Peter Kasting
2015/08/21 17:14:35
Please remove the declaration and definition of th
tdanderson
2015/08/21 18:17:24
Done.
|
| + const int desired_font_size = GetThemeProvider()->GetDisplayProperty( |
| + ThemeProperties::PROPERTY_OMNIBOX_FONT_PIXEL_SIZE); |
| if (current_font_size != desired_font_size) { |
| font_list = |
| font_list.DeriveWithSizeDelta(desired_font_size - current_font_size); |
| } |
| // Shrink large fonts to make them fit. |
| // TODO(pkasting): Stretch the location bar instead in this case. |
| - const int location_height = GetInternalHeight(true); |
| + const int location_height = ui::MaterialDesignController::IsModeMaterial() ? |
| + GetThemeProvider()->GetDisplayProperty( |
| + ThemeProperties::PROPERTY_LOCATION_BAR_HEIGHT) : |
| + GetInternalHeight(true); |
| font_list = font_list.DeriveWithHeightUpperBound(location_height); |
| // Determine the font for use inside the bubbles. The bubble background |