| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #import "ios/chrome/browser/payments/cells/autofill_profile_item.h" | 5 #import "ios/chrome/browser/payments/cells/autofill_profile_item.h" |
| 6 | 6 |
| 7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" | 7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" |
| 8 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 8 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 9 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" | 9 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 _emailLabel.font = [MDCTypography body1Font]; | 125 _emailLabel.font = [MDCTypography body1Font]; |
| 126 _emailLabel.textColor = [[MDCPalette greyPalette] tint900]; | 126 _emailLabel.textColor = [[MDCPalette greyPalette] tint900]; |
| 127 | 127 |
| 128 _notificationLabel.font = [MDCTypography body1Font]; | 128 _notificationLabel.font = [MDCTypography body1Font]; |
| 129 _notificationLabel.textColor = [[MDCPalette cr_bluePalette] tint500]; | 129 _notificationLabel.textColor = [[MDCPalette cr_bluePalette] tint500]; |
| 130 } | 130 } |
| 131 | 131 |
| 132 // Set constraints on subviews. | 132 // Set constraints on subviews. |
| 133 - (void)setViewConstraints { | 133 - (void)setViewConstraints { |
| 134 AddSameSizeConstraint(self.contentView, _stackView); | 134 AddSameConstraints(self.contentView, _stackView); |
| 135 } | 135 } |
| 136 | 136 |
| 137 #pragma mark - UIView | 137 #pragma mark - UIView |
| 138 | 138 |
| 139 // Implement -layoutSubviews as per instructions in documentation for | 139 // Implement -layoutSubviews as per instructions in documentation for |
| 140 // +[MDCCollectionViewCell cr_preferredHeightForWidth:forItem:]. | 140 // +[MDCCollectionViewCell cr_preferredHeightForWidth:forItem:]. |
| 141 - (void)layoutSubviews { | 141 - (void)layoutSubviews { |
| 142 _nameLabel.hidden = !_nameLabel.text; | 142 _nameLabel.hidden = !_nameLabel.text; |
| 143 _addressLabel.hidden = !_addressLabel.text; | 143 _addressLabel.hidden = !_addressLabel.text; |
| 144 _phoneNumberLabel.hidden = !_phoneNumberLabel.text; | 144 _phoneNumberLabel.hidden = !_phoneNumberLabel.text; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 #pragma mark - NSObject(Accessibility) | 187 #pragma mark - NSObject(Accessibility) |
| 188 | 188 |
| 189 - (NSString*)accessibilityLabel { | 189 - (NSString*)accessibilityLabel { |
| 190 return [NSString | 190 return [NSString |
| 191 stringWithFormat:@"%@, %@, %@, %@, %@", self.nameLabel.text, | 191 stringWithFormat:@"%@, %@, %@, %@, %@", self.nameLabel.text, |
| 192 self.addressLabel.text, self.phoneNumberLabel.text, | 192 self.addressLabel.text, self.phoneNumberLabel.text, |
| 193 self.emailLabel.text, self.notificationLabel.text]; | 193 self.emailLabel.text, self.notificationLabel.text]; |
| 194 } | 194 } |
| 195 | 195 |
| 196 @end | 196 @end |
| OLD | NEW |