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

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

Issue 22563006: Fixes vertical misalignment of IME autocompletion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated based on review comments. Created 7 years, 4 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
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 72a84ce3a9d8985274c0a5ce3c84e979787e033a..eb61a18bac33d552a3d192981298234363a92c04 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -279,8 +279,13 @@ void LocationBarView::Init() {
// Initialize the inline autocomplete view which is visible only when IME is
// turned on. Use the same font with the omnibox and highlighted background.
ime_inline_autocomplete_view_ = new views::Label(string16(), font);
- ime_inline_autocomplete_view_->set_border(
- views::Border::CreateEmptyBorder(font_y_offset, 0, 0, 0));
+ {
+ const int baseline_diff = location_entry_view_->GetBaseline() -
Peter Kasting 2013/08/12 19:54:39 Nit: Add comment about why this is needed and when
Yuki 2013/08/13 05:51:18 Done.
+ ime_inline_autocomplete_view_->GetBaseline();
Peter Kasting 2013/08/12 19:54:39 Nit: Indent 4, not even
Yuki 2013/08/13 05:51:18 Done.
+ ime_inline_autocomplete_view_->set_border(
+ views::Border::CreateEmptyBorder(
+ font_y_offset + baseline_diff, 0, 0, 0));
+ }
ime_inline_autocomplete_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
ime_inline_autocomplete_view_->SetAutoColorReadabilityEnabled(false);
ime_inline_autocomplete_view_->set_background(

Powered by Google App Engine
This is Rietveld 408576698