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

Side by Side Diff: chrome/browser/ui/views/payments/order_summary_view_controller.cc

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)
Patch Set: respond to comments Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/payments/order_summary_view_controller.h" 5 #include "chrome/browser/ui/views/payments/order_summary_view_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 layout->StartRow(0, 0); 73 layout->StartRow(0, 0);
74 std::unique_ptr<views::Label> label_text; 74 std::unique_ptr<views::Label> label_text;
75 std::unique_ptr<views::Label> currency_text; 75 std::unique_ptr<views::Label> currency_text;
76 std::unique_ptr<views::Label> amount_text; 76 std::unique_ptr<views::Label> amount_text;
77 if (emphasize) { 77 if (emphasize) {
78 label_text = CreateMediumLabel(label); 78 label_text = CreateMediumLabel(label);
79 currency_text = CreateMediumLabel(currency); 79 currency_text = CreateMediumLabel(currency);
80 amount_text = CreateMediumLabel(amount); 80 amount_text = CreateMediumLabel(amount);
81 } else { 81 } else {
82 label_text = base::MakeUnique<views::Label>(label); 82 label_text = base::MakeUnique<views::Label>(label);
83 currency_text = base::MakeUnique<views::Label>(currency); 83 currency_text = CreateHintLabel(currency);
84 currency_text->SetDisabledColor(
85 currency_text->GetNativeTheme()->GetSystemColor(
86 ui::NativeTheme::kColorId_LabelDisabledColor));
87 currency_text->SetEnabled(false);
88 amount_text = base::MakeUnique<views::Label>(amount); 84 amount_text = base::MakeUnique<views::Label>(amount);
89 } 85 }
90 amount_text->set_id(static_cast<int>(amount_label_id)); 86 amount_text->set_id(static_cast<int>(amount_label_id));
91 amount_text->SetMultiLine(true); 87 amount_text->SetMultiLine(true);
92 amount_text->SetAllowCharacterBreak(true); 88 amount_text->SetAllowCharacterBreak(true);
93 89
94 std::unique_ptr<views::View> amount_wrapper = base::MakeUnique<views::View>(); 90 std::unique_ptr<views::View> amount_wrapper = base::MakeUnique<views::View>();
95 views::GridLayout* wrapper_layout = 91 views::GridLayout* wrapper_layout =
96 new views::GridLayout(amount_wrapper.get()); 92 new views::GridLayout(amount_wrapper.get());
97 views::ColumnSet* wrapper_columns = wrapper_layout->AddColumnSet(0); 93 views::ColumnSet* wrapper_columns = wrapper_layout->AddColumnSet(0);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 true, DialogViewID::ORDER_SUMMARY_TOTAL_CURRENCY_LABEL, 196 true, DialogViewID::ORDER_SUMMARY_TOTAL_CURRENCY_LABEL,
201 DialogViewID::ORDER_SUMMARY_TOTAL_AMOUNT_LABEL) 197 DialogViewID::ORDER_SUMMARY_TOTAL_AMOUNT_LABEL)
202 .release()); 198 .release());
203 } 199 }
204 200
205 void OrderSummaryViewController::UpdatePayButtonState(bool enabled) { 201 void OrderSummaryViewController::UpdatePayButtonState(bool enabled) {
206 pay_button_->SetEnabled(enabled); 202 pay_button_->SetEnabled(enabled);
207 } 203 }
208 204
209 } // namespace payments 205 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698