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

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/autofill/autofill_popup_view_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
index 2fa7ba5d84a0f4b331f0435a4bb0e8783ffe1383..50b2bdcc79e400729bf58fe60cf3da1cd223af2c 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
@@ -77,11 +77,13 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
is_rtl ? gfx::Canvas::TEXT_ALIGN_RIGHT : gfx::Canvas::TEXT_ALIGN_LEFT;
gfx::Rect value_rect = entry_rect;
value_rect.Inset(kEndPadding, 0);
+#if !defined(OS_ANDROID)
canvas->DrawStringRectWithFlags(
controller_->GetElidedValueAt(index),
controller_->GetValueFontListForRow(index),
controller_->IsWarning(index) ? kWarningTextColor : kValueTextColor,
value_rect, text_align);
+#endif
// Use this to figure out where all the other Autofill items should be placed.
int x_align_left = is_rtl ? kEndPadding : entry_rect.right() - kEndPadding;
@@ -103,10 +105,14 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
x_align_left += is_rtl ? image->width() + kIconPadding : -kIconPadding;
}
+#if !defined(OS_ANDROID)
// Draw the label text.
const int label_width =
gfx::GetStringWidth(controller_->GetElidedLabelAt(index),
controller_->GetLabelFontList());
+#else
+ const int label_width = 100;
+#endif
if (!is_rtl)
x_align_left -= label_width;

Powered by Google App Engine
This is Rietveld 408576698