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

Unified Diff: ios/chrome/browser/payments/payment_request_view_controller.mm

Issue 2768933005: Use CollectionViewTextItem instead of a cast (Closed)
Patch Set: Remove MDFRoboto Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/reading_list/reading_list_collection_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/payments/payment_request_view_controller.mm
diff --git a/ios/chrome/browser/payments/payment_request_view_controller.mm b/ios/chrome/browser/payments/payment_request_view_controller.mm
index f643121fcf318b6a28cb7e4387abb07d4cae3c5e..ba0d060ccbad4eb20454e57ff23fd5492cd8e3b4 100644
--- a/ios/chrome/browser/payments/payment_request_view_controller.mm
+++ b/ios/chrome/browser/payments/payment_request_view_controller.mm
@@ -260,7 +260,13 @@ typedef NS_ENUM(NSInteger, ItemType) {
if (_paymentRequest->selected_shipping_option()) {
CollectionViewTextItem* selectedShippingOptionItem =
[[CollectionViewTextItem alloc] initWithType:ItemTypeShippingOption];
+ selectedShippingOptionItem.textFont = [MDCTypography body2Font];
+ selectedShippingOptionItem.textColor = [[MDCPalette greyPalette] tint900];
+ selectedShippingOptionItem.detailTextFont = [MDCTypography body1Font];
+ selectedShippingOptionItem.detailTextColor =
+ [[MDCPalette greyPalette] tint900];
shippingOptionItem = selectedShippingOptionItem;
+
_selectedShippingOptionItem = selectedShippingOptionItem;
[self fillShippingOptionItem:selectedShippingOptionItem
withOption:_paymentRequest->selected_shipping_option()];
@@ -470,15 +476,6 @@ typedef NS_ENUM(NSInteger, ItemType) {
[[MDCPalette cr_bluePalette] tint700];
break;
}
- case ItemTypeShippingOption: {
- MDCCollectionViewTextCell* textCell =
- base::mac::ObjCCastStrict<MDCCollectionViewTextCell>(cell);
- textCell.textLabel.font = [MDCTypography body2Font];
- textCell.textLabel.textColor = [[MDCPalette greyPalette] tint900];
- textCell.detailTextLabel.font = [MDCTypography body1Font];
- textCell.detailTextLabel.textColor = [[MDCPalette greyPalette] tint900];
- break;
- }
default:
break;
}
« no previous file with comments | « no previous file | ios/chrome/browser/ui/reading_list/reading_list_collection_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698