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

Unified Diff: chrome/browser/ui/views/payments/order_summary_view_controller.cc

Issue 2899653002: Remove uses of FontList::Derive*(..) in views payments dialogs. (Closed)
Patch Set: self review Created 3 years, 7 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/payments/order_summary_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/order_summary_view_controller.cc b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
index dd50c2a1a76bc933b06c03c369e50a8b8584ea50..2d8f18b5f0a152f637755e9a84fdc6c5e21fb8d1 100644
--- a/chrome/browser/ui/views/payments/order_summary_view_controller.cc
+++ b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
@@ -69,17 +69,16 @@ std::unique_ptr<views::View> CreateLineItemView(const base::string16& label,
kAmountSectionWidth);
layout->StartRow(0, 0);
- std::unique_ptr<views::Label> label_text =
- base::MakeUnique<views::Label>(label);
- std::unique_ptr<views::Label> amount_text =
- base::MakeUnique<views::Label>(amount);
- amount_text->set_id(static_cast<int>(amount_label_id));
+ std::unique_ptr<views::Label> label_text;
+ std::unique_ptr<views::Label> amount_text;
if (emphasize) {
- label_text->SetFontList(
- label_text->font_list().DeriveWithWeight(gfx::Font::Weight::MEDIUM));
- amount_text->SetFontList(
- amount_text->font_list().DeriveWithWeight(gfx::Font::Weight::MEDIUM));
+ label_text = CreateMediumLabel(label);
+ amount_text = CreateMediumLabel(amount);
+ } else {
+ label_text = base::MakeUnique<views::Label>(label);
+ amount_text = base::MakeUnique<views::Label>(amount);
}
+ amount_text->set_id(static_cast<int>(amount_label_id));
layout->AddView(label_text.release());
layout->AddView(amount_text.release());

Powered by Google App Engine
This is Rietveld 408576698