| 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/autofill/cells/autofill_edit_item.h" | 5 #import "ios/chrome/browser/ui/autofill/cells/autofill_edit_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/rtl_geometry.h" | 8 #import "ios/chrome/browser/ui/rtl_geometry.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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 _textField.autocorrectionType = UITextAutocorrectionTypeNo; | 106 _textField.autocorrectionType = UITextAutocorrectionTypeNo; |
| 107 _textField.returnKeyType = UIReturnKeyDone; | 107 _textField.returnKeyType = UIReturnKeyDone; |
| 108 _textField.clearButtonMode = UITextFieldViewModeWhileEditing; | 108 _textField.clearButtonMode = UITextFieldViewModeWhileEditing; |
| 109 _textField.contentVerticalAlignment = | 109 _textField.contentVerticalAlignment = |
| 110 UIControlContentVerticalAlignmentCenter; | 110 UIControlContentVerticalAlignmentCenter; |
| 111 _textField.textAlignment = | 111 _textField.textAlignment = |
| 112 UseRTLLayout() ? NSTextAlignmentLeft : NSTextAlignmentRight; | 112 UseRTLLayout() ? NSTextAlignmentLeft : NSTextAlignmentRight; |
| 113 | 113 |
| 114 // Card type icon. | 114 // Card type icon. |
| 115 _cardTypeIconView = [[UIImageView alloc] initWithFrame:CGRectZero]; | 115 _cardTypeIconView = [[UIImageView alloc] initWithFrame:CGRectZero]; |
| 116 _cardTypeIconView.layer.borderColor = | |
| 117 [UIColor colorWithWhite:0.9 alpha:1.0].CGColor; | |
| 118 _cardTypeIconView.layer.borderWidth = 1.0; | |
| 119 _cardTypeIconView.translatesAutoresizingMaskIntoConstraints = NO; | 116 _cardTypeIconView.translatesAutoresizingMaskIntoConstraints = NO; |
| 120 [contentView addSubview:_cardTypeIconView]; | 117 [contentView addSubview:_cardTypeIconView]; |
| 121 | 118 |
| 122 // Set up the icons size constraints. They are activated here and updated in | 119 // Set up the icons size constraints. They are activated here and updated in |
| 123 // layoutSubviews. | 120 // layoutSubviews. |
| 124 _iconHeightConstraint = | 121 _iconHeightConstraint = |
| 125 [_cardTypeIconView.heightAnchor constraintEqualToConstant:0]; | 122 [_cardTypeIconView.heightAnchor constraintEqualToConstant:0]; |
| 126 _iconWidthConstraint = | 123 _iconWidthConstraint = |
| 127 [_cardTypeIconView.widthAnchor constraintEqualToConstant:0]; | 124 [_cardTypeIconView.widthAnchor constraintEqualToConstant:0]; |
| 128 | 125 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 193 } |
| 197 | 194 |
| 198 #pragma mark - Accessibility | 195 #pragma mark - Accessibility |
| 199 | 196 |
| 200 - (NSString*)accessibilityLabel { | 197 - (NSString*)accessibilityLabel { |
| 201 return [NSString | 198 return [NSString |
| 202 stringWithFormat:@"%@, %@", self.textLabel.text, self.textField.text]; | 199 stringWithFormat:@"%@, %@", self.textLabel.text, self.textField.text]; |
| 203 } | 200 } |
| 204 | 201 |
| 205 @end | 202 @end |
| OLD | NEW |