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

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

Issue 2710893002: Fix appearance of text in omnibox when no leading decorations are (Closed)
Patch Set: Created 3 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_layout.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_layout.cc b/chrome/browser/ui/views/location_bar/location_bar_layout.cc
index d28201821314512c0194701164f07fbcd4dfdd36..34e858f8bf10c73830c7a027e765a1f19a09dc1c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_layout.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_layout.cc
@@ -165,7 +165,10 @@ void LocationBarLayout::LayoutPass3(gfx::Rect* bounds, int* available_width) {
if (position_ == LEFT_EDGE)
bounds->set_x(bounds->x() + padding + decoration->computed_width);
}
- bounds->set_width(bounds->width() - item_edit_padding_);
- if (position_ == LEFT_EDGE)
- bounds->set_x(bounds->x() + item_edit_padding_);
+ // Only apply the edit padding if there's a visible decoration to pad against.
+ if (!first_visible) {
+ bounds->set_width(bounds->width() - item_edit_padding_);
+ if (position_ == LEFT_EDGE)
+ bounds->set_x(bounds->x() + item_edit_padding_);
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698