OLD | NEW |
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/payment_sheet_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, | 161 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, |
162 0, views::GridLayout::USE_PREF, 0, 0); | 162 0, views::GridLayout::USE_PREF, 0, 0); |
163 | 163 |
164 constexpr int kPaddingColumnsWidth = 25; | 164 constexpr int kPaddingColumnsWidth = 25; |
165 columns->AddPaddingColumn(0, kPaddingColumnsWidth); | 165 columns->AddPaddingColumn(0, kPaddingColumnsWidth); |
166 // A column for the trailing_button. | 166 // A column for the trailing_button. |
167 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, | 167 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, |
168 0, views::GridLayout::USE_PREF, 0, 0); | 168 0, views::GridLayout::USE_PREF, 0, 0); |
169 | 169 |
170 layout->StartRow(0, 0); | 170 layout->StartRow(0, 0); |
171 std::unique_ptr<views::Label> name_label = CreateMediumLabel(section_name); | 171 views::Label* name_label = new views::Label(section_name); |
172 name_label->SetMultiLine(true); | 172 name_label->SetMultiLine(true); |
173 layout->AddView(name_label.release()); | 173 name_label->SetFontList( |
| 174 name_label->font_list().DeriveWithWeight(gfx::Font::Weight::MEDIUM)); |
| 175 layout->AddView(name_label); |
174 | 176 |
175 if (content_view) { | 177 if (content_view) { |
176 content_view->set_can_process_events_within_subtree(false); | 178 content_view->set_can_process_events_within_subtree(false); |
177 layout->AddView(content_view.release()); | 179 layout->AddView(content_view.release()); |
178 } else { | 180 } else { |
179 layout->SkipColumns(1); | 181 layout->SkipColumns(1); |
180 } | 182 } |
181 | 183 |
182 if (extra_content_view) { | 184 if (extra_content_view) { |
183 extra_content_view->set_can_process_events_within_subtree(false); | 185 extra_content_view->set_can_process_events_within_subtree(false); |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 data_source_label->SetDefaultStyle(default_style); | 944 data_source_label->SetDefaultStyle(default_style); |
943 data_source_label->AddStyleRange( | 945 data_source_label->AddStyleRange( |
944 gfx::Range(link_begin, link_begin + link_length), | 946 gfx::Range(link_begin, link_begin + link_length), |
945 views::StyledLabel::RangeStyleInfo::CreateForLink()); | 947 views::StyledLabel::RangeStyleInfo::CreateForLink()); |
946 data_source_label->SizeToFit(0); | 948 data_source_label->SizeToFit(0); |
947 content_view->AddChildView(data_source_label.release()); | 949 content_view->AddChildView(data_source_label.release()); |
948 return content_view; | 950 return content_view; |
949 } | 951 } |
950 | 952 |
951 } // namespace payments | 953 } // namespace payments |
OLD | NEW |