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

Unified Diff: ios/chrome/browser/ui/settings/translate_collection_view_controller.mm

Issue 2817953002: CollectionViewTextItem no longer styles CollectionViewTextCell (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/settings/translate_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm b/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm
index ef4a29c9c4c7e60db95ce4a0c50e0f57f25d5efc..d0694f5d2553bd69ed852d7e4c79f65a60729790 100644
--- a/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm
@@ -19,6 +19,7 @@
#import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item.h"
+#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h"
#import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
#import "ios/chrome/browser/ui/settings/settings_utils.h"
@@ -107,7 +108,6 @@ NSString* const kTranslateSettingsCategory = @"ChromeTranslateSettings";
initWithType:ItemTypeResetTranslate] autorelease];
resetTranslate.text = l10n_util::GetNSString(IDS_IOS_TRANSLATE_SETTING_RESET);
resetTranslate.accessibilityTraits |= UIAccessibilityTraitButton;
- resetTranslate.textFont = [MDCTypography body2Font];
[model addItem:resetTranslate
toSectionWithIdentifier:SectionIdentifierTranslate];
@@ -141,6 +141,15 @@ NSString* const kTranslateSettingsCategory = @"ChromeTranslateSettings";
forControlEvents:UIControlEventValueChanged];
break;
}
+ case ItemTypeResetTranslate: {
+ CollectionViewTextCell* textCell =
+ base::mac::ObjCCastStrict<CollectionViewTextCell>(cell);
+ textCell.textLabel.font = [MDCTypography body2Font];
+ textCell.textLabel.textColor = [[MDCPalette greyPalette] tint900];
+ textCell.detailTextLabel.font = [MDCTypography body1Font];
+ textCell.detailTextLabel.textColor = [[MDCPalette greyPalette] tint500];
+ break;
+ }
default:
break;
}

Powered by Google App Engine
This is Rietveld 408576698