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 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_account_ite
m.h" | 5 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_account_ite
m.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" | 8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" |
9 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat
erialPalettes.h" | 9 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat
erialPalettes.h" |
10 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF
ontLoader.h" | 10 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF
ontLoader.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 235 } |
236 } | 236 } |
237 | 237 |
238 #pragma mark - UICollectionReusableView | 238 #pragma mark - UICollectionReusableView |
239 | 239 |
240 - (void)prepareForReuse { | 240 - (void)prepareForReuse { |
241 [super prepareForReuse]; | 241 [super prepareForReuse]; |
242 self.imageView.image = nil; | 242 self.imageView.image = nil; |
243 self.textLabel.text = nil; | 243 self.textLabel.text = nil; |
244 self.detailTextLabel.text = nil; | 244 self.detailTextLabel.text = nil; |
| 245 self.textLabel.textColor = [[MDCPalette greyPalette] tint900]; |
245 self.detailTextLabel.textColor = [[MDCPalette greyPalette] tint500]; | 246 self.detailTextLabel.textColor = [[MDCPalette greyPalette] tint500]; |
246 self.errorIcon.image = nil; | 247 self.errorIcon.image = nil; |
247 self.accessoryType = MDCCollectionViewCellAccessoryNone; | 248 self.accessoryType = MDCCollectionViewCellAccessoryNone; |
248 self.userInteractionEnabled = YES; | 249 self.userInteractionEnabled = YES; |
249 self.contentView.alpha = 1; | 250 self.contentView.alpha = 1; |
250 UIImageView* accessoryImage = | 251 UIImageView* accessoryImage = |
251 base::mac::ObjCCastStrict<UIImageView>(self.accessoryView); | 252 base::mac::ObjCCastStrict<UIImageView>(self.accessoryView); |
252 accessoryImage.tintColor = | 253 accessoryImage.tintColor = |
253 [accessoryImage.tintColor colorWithAlphaComponent:1]; | 254 [accessoryImage.tintColor colorWithAlphaComponent:1]; |
254 } | 255 } |
255 | 256 |
256 #pragma mark - NSObject(Accessibility) | 257 #pragma mark - NSObject(Accessibility) |
257 | 258 |
258 - (NSString*)accessibilityLabel { | 259 - (NSString*)accessibilityLabel { |
259 return self.textLabel.text; | 260 return self.textLabel.text; |
260 } | 261 } |
261 | 262 |
262 - (NSString*)accessibilityValue { | 263 - (NSString*)accessibilityValue { |
263 return self.detailTextLabel.text; | 264 return self.detailTextLabel.text; |
264 } | 265 } |
265 | 266 |
266 @end | 267 @end |
OLD | NEW |