| Index: chrome/browser/ui/views/passwords/credentials_item_view.cc
|
| diff --git a/chrome/browser/ui/views/passwords/credentials_item_view.cc b/chrome/browser/ui/views/passwords/credentials_item_view.cc
|
| index 8f0e4faeebcccb638ff3367b69bccefc66ae4777..a3414471ac2217ed8760f17cb67f55678ff36abe 100644
|
| --- a/chrome/browser/ui/views/passwords/credentials_item_view.cc
|
| +++ b/chrome/browser/ui/views/passwords/credentials_item_view.cc
|
| @@ -7,9 +7,11 @@
|
| #include "base/macros.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
|
| +#include "chrome/browser/ui/views/harmony/layout_delegate.h"
|
| #include "chrome/grit/generated_resources.h"
|
| #include "chrome/grit/theme_resources.h"
|
| #include "components/autofill/core/common/password_form.h"
|
| +#include "ui/base/material_design/material_design_controller.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/path.h"
|
| @@ -90,17 +92,24 @@ CredentialsItemView::CredentialsItemView(
|
| }
|
| AddChildView(image_view_);
|
|
|
| - ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
|
| + // TODO(tapted): Check these against the spec on http://crbug.com/651681.
|
| + const views::TextContext kLabelContext =
|
| + ui::MaterialDesignController::IsSecondaryUiMaterial()
|
| + ? ChromeTextContext::DIALOG_TEXT_SMALL
|
| + : ChromeTextContext::DEPRECATED_SMALL;
|
| + constexpr views::TextStyle kUpperLabelStyle = views::TextStyle::PRIMARY;
|
| + constexpr views::TextStyle kLowerLabelStyle = views::TextStyle::SECONDARY;
|
| +
|
| if (!upper_text.empty()) {
|
| - upper_label_ = new views::Label(
|
| - upper_text, rb->GetFontList(ui::ResourceBundle::SmallFont));
|
| + upper_label_ =
|
| + new views::Label(upper_text, kLabelContext, kUpperLabelStyle);
|
| upper_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
|
| AddChildView(upper_label_);
|
| }
|
|
|
| if (!lower_text.empty()) {
|
| - lower_label_ = new views::Label(
|
| - lower_text, rb->GetFontList(ui::ResourceBundle::SmallFont));
|
| + lower_label_ =
|
| + new views::Label(lower_text, kLabelContext, kLowerLabelStyle);
|
| lower_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
|
| lower_label_->SetMultiLine(true);
|
| AddChildView(lower_label_);
|
|
|