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

Unified Diff: ios/chrome/browser/ui/settings/translate_collection_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 | « ios/chrome/browser/ui/settings/sync_settings_collection_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bd4a0f97198ad62a8ef5310841cfbd9a0cc8d1eb..ef4a29c9c4c7e60db95ce4a0c50e0f57f25d5efc 100644
--- a/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/translate_collection_view_controller.mm
@@ -28,7 +28,7 @@
#include "ios/chrome/grit/ios_strings.h"
#import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h"
#import "ios/third_party/material_components_ios/src/components/Snackbar/src/MaterialSnackbar.h"
-#import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoFontLoader.h"
+#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
@@ -107,6 +107,7 @@ 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];
@@ -140,13 +141,6 @@ NSString* const kTranslateSettingsCategory = @"ChromeTranslateSettings";
forControlEvents:UIControlEventValueChanged];
break;
}
- case ItemTypeResetTranslate: {
- MDCCollectionViewTextCell* textCell =
- base::mac::ObjCCastStrict<MDCCollectionViewTextCell>(cell);
- textCell.textLabel.font =
- [[MDFRobotoFontLoader sharedInstance] mediumFontOfSize:14];
- break;
- }
default:
break;
}
« no previous file with comments | « ios/chrome/browser/ui/settings/sync_settings_collection_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698