Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8893)

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2464063002: Revert of Some more pre-material cleanups (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 a953ccd8475184ad8a99f2d67364f11573dafa7c..288af689f25eb670b606e7e782470f346905713a 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -515,6 +515,7 @@
} else if (ShouldShowSecurityChip()) {
base::string16 security_text = GetSecurityText();
leading_width +=
+ GetLayoutConstant(LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING) +
location_icon_view_->GetMinimumSizeForLabelText(security_text).width();
} else {
leading_width += padding + location_icon_view_->GetMinimumSize().width();
@@ -564,14 +565,16 @@
// to position our child views in this case, because other things may be
// 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);
const int vertical_padding = GetTotalVerticalPadding();
const int location_height = std::max(height() - (vertical_padding * 2), 0);
location_icon_view_->SetLabel(base::string16());
if (ShouldShowKeywordBubble()) {
leading_decorations.AddDecoration(vertical_padding, location_height, true,
- 0, 0, item_padding,
- selected_keyword_view_);
+ 0, bubble_horizontal_padding,
+ item_padding, selected_keyword_view_);
if (selected_keyword_view_->keyword() != keyword) {
selected_keyword_view_->SetKeyword(keyword);
const TemplateURL* template_url =
@@ -590,9 +593,9 @@
location_icon_view_->SetLabel(GetSecurityText());
// The largest fraction of the omnibox that can be taken by the EV bubble.
const double kMaxBubbleFraction = 0.5;
- leading_decorations.AddDecoration(vertical_padding, location_height, false,
- kMaxBubbleFraction, 0, item_padding,
- location_icon_view_);
+ leading_decorations.AddDecoration(
+ vertical_padding, location_height, false, kMaxBubbleFraction,
+ bubble_horizontal_padding, item_padding, location_icon_view_);
} else {
leading_decorations.AddDecoration(vertical_padding, location_height,
location_icon_view_);
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698