Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_article_item.mm

Issue 2823263002: Rename |AddSameSizeConstraint| to |AddSameConstraints|. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/cells/content_suggestions_art icle_item.h" 5 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_art icle_item.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" 8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
9 #import "ios/chrome/browser/ui/favicon/favicon_attributes.h" 9 #import "ios/chrome/browser/ui/favicon/favicon_attributes.h"
10 #import "ios/chrome/browser/ui/favicon/favicon_view.h" 10 #import "ios/chrome/browser/ui/favicon/favicon_view.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 // No image icon. 277 // No image icon.
278 [_noImageIcon.centerXAnchor 278 [_noImageIcon.centerXAnchor
279 constraintEqualToAnchor:_imageContainer.centerXAnchor], 279 constraintEqualToAnchor:_imageContainer.centerXAnchor],
280 [_noImageIcon.centerYAnchor 280 [_noImageIcon.centerYAnchor
281 constraintEqualToAnchor:_imageContainer.centerYAnchor], 281 constraintEqualToAnchor:_imageContainer.centerYAnchor],
282 [_noImageIcon.widthAnchor constraintEqualToConstant:kIconSize], 282 [_noImageIcon.widthAnchor constraintEqualToConstant:kIconSize],
283 [_noImageIcon.heightAnchor constraintEqualToAnchor:_noImageIcon.widthAnchor] 283 [_noImageIcon.heightAnchor constraintEqualToAnchor:_noImageIcon.widthAnchor]
284 ]]; 284 ]];
285 285
286 AddSameSizeConstraint(_contentImageView, _imageContainer); 286 AddSameConstraints(_contentImageView, _imageContainer);
287 287
288 ApplyVisualConstraintsWithMetrics( 288 ApplyVisualConstraintsWithMetrics(
289 @[ 289 @[
290 @"H:|-(space)-[title]-(space)-[image]-(space)-|", 290 @"H:|-(space)-[title]-(space)-[image]-(space)-|",
291 @"H:|-(space)-[text]-(space)-[image]", 291 @"H:|-(space)-[text]-(space)-[image]",
292 @"V:|-(space)-[title]-[text]", 292 @"V:|-(space)-[title]-[text]",
293 @"H:|-(space)-[favicon]-(small)-[publish]-(space)-|", 293 @"H:|-(space)-[favicon]-(small)-[publish]-(space)-|",
294 ], 294 ],
295 @{ 295 @{
296 @"image" : _imageContainer, 296 @"image" : _imageContainer,
297 @"title" : _titleLabel, 297 @"title" : _titleLabel,
298 @"text" : _subtitleLabel, 298 @"text" : _subtitleLabel,
299 @"publish" : _publisherLabel, 299 @"publish" : _publisherLabel,
300 @"favicon" : _faviconView, 300 @"favicon" : _faviconView,
301 }, 301 },
302 @{ @"space" : @(kStandardSpacing), 302 @{ @"space" : @(kStandardSpacing),
303 @"small" : @(kSmallSpacing) }); 303 @"small" : @(kSmallSpacing) });
304 } 304 }
305 305
306 @end 306 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698