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 6b4235d1f1b8bcacf45da01c17582ccdf9de49a4..f77109a4205bcd4ea9149c76629fee97ec728802 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -218,10 +218,13 @@ void LocationBarView::Init() { |
const int bubble_height = location_height - (bubble_padding * 2); |
gfx::FontList bubble_font_list = |
font_list.DeriveWithHeightUpperBound(bubble_height); |
+ gfx::FontList chip_font_list = ui::MaterialDesignController::IsModeMaterial() |
+ ? font_list |
+ : bubble_font_list; |
const SkColor background_color = GetColor(BACKGROUND); |
location_icon_view_ = |
- new LocationIconView(bubble_font_list, background_color, this); |
+ new LocationIconView(chip_font_list, background_color, this); |
location_icon_view_->set_drag_controller(this); |
AddChildView(location_icon_view_); |
@@ -248,7 +251,7 @@ void LocationBarView::Init() { |
const SkColor selected_text_color = GetColor(TEXT); |
selected_keyword_view_ = new SelectedKeywordView( |
- bubble_font_list, selected_text_color, background_color, profile()); |
+ chip_font_list, selected_text_color, background_color, profile()); |
AddChildView(selected_keyword_view_); |
suggested_text_view_ = new views::Label(base::string16(), font_list); |
@@ -269,7 +272,7 @@ void LocationBarView::Init() { |
for (ContentSettingImageModel* model : models.get()) { |
// ContentSettingImageView takes ownership of its model. |
ContentSettingImageView* image_view = new ContentSettingImageView( |
- model, this, bubble_font_list, background_color); |
+ model, this, chip_font_list, background_color); |
content_setting_views_.push_back(image_view); |
image_view->SetVisible(false); |
AddChildView(image_view); |
@@ -577,8 +580,10 @@ void LocationBarView::Layout() { |
LocationBarLayout leading_decorations( |
LocationBarLayout::LEFT_EDGE, item_padding, |
- item_padding - omnibox_view_->GetInsets().left() - |
- GetEditLeadingInternalSpace()); |
+ ui::MaterialDesignController::IsModeMaterial() |
+ ? 2 |
+ : item_padding - omnibox_view_->GetInsets().left() - |
+ GetEditLeadingInternalSpace()); |
Peter Kasting
2016/05/20 20:54:11
Nit: I'd parenthesize this last subexpr just to av
Evan Stade
2016/05/20 22:33:53
Done.
|
LocationBarLayout trailing_decorations( |
LocationBarLayout::RIGHT_EDGE, item_padding, trailing_edge_item_padding); |