| 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/ui/content_suggestions/content_suggestions_expandabl
e_item.h" | 5 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_exp
andable_item.h" |
| 6 | 6 |
| 7 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 7 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 8 #include "ui/base/l10n/l10n_util_mac.h" | 8 #include "ui/base/l10n/l10n_util_mac.h" |
| 9 | 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) | 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." | 11 #error "This file requires ARC support." |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 const CGFloat kImageSize = 80; | 15 const CGFloat kImageSize = 80; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 CGFloat parentWidth = CGRectGetWidth(self.contentView.bounds); | 228 CGFloat parentWidth = CGRectGetWidth(self.contentView.bounds); |
| 229 _subtitleLabel.preferredMaxLayoutWidth = parentWidth - kImageSize - 3 * 8; | 229 _subtitleLabel.preferredMaxLayoutWidth = parentWidth - kImageSize - 3 * 8; |
| 230 _detailLabel.preferredMaxLayoutWidth = parentWidth; | 230 _detailLabel.preferredMaxLayoutWidth = parentWidth; |
| 231 | 231 |
| 232 // Re-layout with the new preferred width to allow the label to adjust its | 232 // Re-layout with the new preferred width to allow the label to adjust its |
| 233 // height. | 233 // height. |
| 234 [super layoutSubviews]; | 234 [super layoutSubviews]; |
| 235 } | 235 } |
| 236 | 236 |
| 237 @end | 237 @end |
| OLD | NEW |