Commit 7c43f2b6 authored by Robbie Gibson's avatar Robbie Gibson Committed by Commit Bot

[iOS][Dark Mode] Replace remaining label colors with dark mode versions

The changes are replacing darker, primary text with kTextPrimaryColor
and lighter, secondary text with kTextSecondaryColor.

Bug: 1002409
Change-Id: I2a1cfa0eb5907cc1c40b722c2ddbd9285187a56a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1794865
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695164}
parent aa0bc9db
...@@ -10,17 +10,14 @@ ...@@ -10,17 +10,14 @@
// The amount of padding at the top and bottom of UIKit-style cells. // The amount of padding at the top and bottom of UIKit-style cells.
const CGFloat kUIKitVerticalPadding = 16; const CGFloat kUIKitVerticalPadding = 16;
// The font size and color to use for main text in UIKit-style cells. // The font size to use for main text in UIKit-style cells.
const int kUIKitMainTextColor = 0x000000;
const CGFloat kUIKitMainFontSize = 17; const CGFloat kUIKitMainFontSize = 17;
// The font size and color to use for detail text that is on the trailing edge // The font size to use for detail text that is on the trailing edge
// of the top line. // of the top line.
const int kUIKitDetailTextColor = 0x767676;
const CGFloat kUIKitDetailFontSize = 17; const CGFloat kUIKitDetailFontSize = 17;
// The font size and color to use for detail text that is on its own line. // The font size to use for detail text that is on its own line.
const int kUIKitMultilineDetailTextColor = 0x767676;
const CGFloat kUIKitMultilineDetailFontSize = 12; const CGFloat kUIKitMultilineDetailFontSize = 12;
// The font size and color to use for footer text in UIKit-style cells. // The font size and color to use for footer text in UIKit-style cells.
......
...@@ -15,6 +15,7 @@ source_set("legacy") { ...@@ -15,6 +15,7 @@ source_set("legacy") {
"//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/colors",
"//ios/chrome/browser/ui/icons", "//ios/chrome/browser/ui/icons",
"//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/util",
"//ios/chrome/common/colors",
"//ios/chrome/common/ui_util", "//ios/chrome/common/ui_util",
"//ios/third_party/material_roboto_font_loader_ios", "//ios/third_party/material_roboto_font_loader_ios",
"//ui/base", "//ui/base",
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h" #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h"
#include "ios/chrome/browser/ui/collection_view/cells/collection_view_cell_constants.h" #include "ios/chrome/browser/ui/collection_view/cells/collection_view_cell_constants.h"
#import "ios/chrome/browser/ui/util/uikit_ui_util.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h"
#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h"
#import "ios/chrome/common/ui_util/constraints_ui_util.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h"
#import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h" #import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h"
#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h" #import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h"
...@@ -102,15 +103,15 @@ const CGFloat kMinDetailTextWidthRatio = 0.25f; ...@@ -102,15 +103,15 @@ const CGFloat kMinDetailTextWidthRatio = 0.25f;
_textLabel = [[UILabel alloc] init]; _textLabel = [[UILabel alloc] init];
_textLabel.translatesAutoresizingMaskIntoConstraints = NO; _textLabel.translatesAutoresizingMaskIntoConstraints = NO;
_textLabel.font = [UIFont systemFontOfSize:kUIKitMainFontSize]; _textLabel.font = [UIFont systemFontOfSize:kUIKitMainFontSize];
_textLabel.textColor = UIColorFromRGB(kUIKitMainTextColor); _textLabel.textColor = UIColor.cr_labelColor;
_textLabel.backgroundColor = [UIColor clearColor]; _textLabel.backgroundColor = UIColor.clearColor;
[contentView addSubview:_textLabel]; [contentView addSubview:_textLabel];
_detailTextLabel = [[UILabel alloc] init]; _detailTextLabel = [[UILabel alloc] init];
_detailTextLabel.translatesAutoresizingMaskIntoConstraints = NO; _detailTextLabel.translatesAutoresizingMaskIntoConstraints = NO;
_detailTextLabel.font = [UIFont systemFontOfSize:kUIKitDetailFontSize]; _detailTextLabel.font = [UIFont systemFontOfSize:kUIKitDetailFontSize];
_detailTextLabel.textColor = UIColorFromRGB(kUIKitDetailTextColor); _detailTextLabel.textColor = UIColor.cr_secondaryLabelColor;
_detailTextLabel.backgroundColor = [UIColor clearColor]; _detailTextLabel.backgroundColor = UIColor.clearColor;
[contentView addSubview:_detailTextLabel]; [contentView addSubview:_detailTextLabel];
// Set up the width constraints. They are activated here and updated in // Set up the width constraints. They are activated here and updated in
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h"
#include "ios/chrome/browser/ui/ui_feature_flags.h" #include "ios/chrome/browser/ui/ui_feature_flags.h"
#include "ios/chrome/browser/ui/util/uikit_ui_util.h" #include "ios/chrome/browser/ui/util/uikit_ui_util.h"
#import "ios/chrome/common/colors/semantic_color_names.h"
#include "url/gurl.h" #include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
...@@ -54,7 +55,7 @@ ...@@ -54,7 +55,7 @@
cell.titleLabel.textColor = styler.cellTitleColor; cell.titleLabel.textColor = styler.cellTitleColor;
} }
cell.URLLabel.textColor = UIColorFromRGB(kSettingsCellsURLTextColor); cell.URLLabel.textColor = [UIColor colorNamed:kTextSecondaryColor];
[cell configureUILayout]; [cell configureUILayout];
} }
......
...@@ -7,12 +7,6 @@ ...@@ -7,12 +7,6 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
// The color of the detail text for the settings cells.
extern const int kSettingsCellsDetailTextColor;
// The color of the URL text for the settings cells.
extern const int kSettingsCellsURLTextColor;
// Default height for the settings cells. // Default height for the settings cells.
extern const CGFloat kSettingsCellDefaultHeight; extern const CGFloat kSettingsCellDefaultHeight;
......
...@@ -8,7 +8,4 @@ ...@@ -8,7 +8,4 @@
#error "This file requires ARC support." #error "This file requires ARC support."
#endif #endif
const int kSettingsCellsDetailTextColor = 0x767676;
const int kSettingsCellsURLTextColor = 0x5F6368;
const CGFloat kSettingsCellDefaultHeight = 70; const CGFloat kSettingsCellDefaultHeight = 70;
...@@ -116,8 +116,7 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -116,8 +116,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
} }
if (!self.languageItem.canOfferTranslate) { if (!self.languageItem.canOfferTranslate) {
offerTranslateItem.enabled = NO; offerTranslateItem.enabled = NO;
offerTranslateItem.textColor = offerTranslateItem.textColor = [UIColor colorNamed:kTextSecondaryColor];
UIColorFromRGB(kSettingsCellsDetailTextColor);
} }
[model addItem:offerTranslateItem [model addItem:offerTranslateItem
toSectionWithIdentifier:SectionIdentifierOptions]; toSectionWithIdentifier:SectionIdentifierOptions];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment