| 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..68aa2860d3f851b94814193407a536631a35f338 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());
|
| LocationBarLayout trailing_decorations(
|
| LocationBarLayout::RIGHT_EDGE, item_padding, trailing_edge_item_padding);
|
|
|
| @@ -588,7 +593,9 @@ void LocationBarView::Layout() {
|
| // positioned relative to them (e.g. the "bookmark added" bubble if the user
|
| // hits ctrl-d).
|
| const int bubble_horizontal_padding =
|
| - GetLayoutConstant(LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING);
|
| + ui::MaterialDesignController::IsModeMaterial()
|
| + ? 0
|
| + : GetLayoutConstant(LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING);
|
| const int vertical_padding = GetVerticalEdgeThicknessWithPadding();
|
| const int location_height = std::max(height() - (vertical_padding * 2), 0);
|
|
|
|
|