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..b26492226bcc4b5be0980d656297d451f8efa0b8 100644 |
--- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
+++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
@@ -7,6 +7,7 @@ |
#include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
#include "components/autofill/core/browser/popup_item_ids.h" |
#include "components/autofill/core/browser/suggestion.h" |
+#include "ui/base/resource/material_design/material_design_controller.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/events/keycodes/keyboard_codes.h" |
#include "ui/gfx/canvas.h" |
@@ -72,11 +73,14 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas, |
if (controller_->selected_line() == index) |
canvas->FillRect(entry_rect, kHoveredBackgroundColor); |
+ int end_padding = ui::MaterialDesignController::IsModeMaterial() |
+ ? kMaterialEndPadding |
+ : kEndPadding; |
const bool is_rtl = controller_->IsRTL(); |
const int text_align = |
is_rtl ? gfx::Canvas::TEXT_ALIGN_RIGHT : gfx::Canvas::TEXT_ALIGN_LEFT; |
gfx::Rect value_rect = entry_rect; |
- value_rect.Inset(kEndPadding, 0); |
+ value_rect.Inset(end_padding, 0); |
canvas->DrawStringRectWithFlags( |
controller_->GetElidedValueAt(index), |
controller_->GetValueFontListForRow(index), |
@@ -84,7 +88,7 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas, |
value_rect, text_align); |
// 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; |
+ int x_align_left = is_rtl ? end_padding : entry_rect.right() - end_padding; |
// Draw the Autofill icon, if one exists |
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |