Commit b690a8b1 authored by Robbie Gibson's avatar Robbie Gibson Committed by Commit Bot

[iOS][Dark mode] Use custom semantic colors in reading list

Bug: 976665
Change-Id: Iaab827e250e73c7ea788442285ddfd5ad2050f58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731903
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683607}
parent 5ac01914
......@@ -102,7 +102,7 @@ const CGFloat kLabelMargin = 2.5f;
[self addSubview:self.textBadge];
self.didAddSubviews = YES;
[self activateConstraints];
self.backgroundColor = [UIColor clearColor];
self.backgroundColor = UIColor.clearColor;
// Start hidden.
self.alpha = 0.0;
self.hidden = YES;
......
......@@ -8,6 +8,7 @@
#import "ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator.h"
#import "ios/chrome/browser/ui/reading_list/reading_list_toolbar_button_commands.h"
#import "ios/chrome/browser/ui/reading_list/reading_list_toolbar_button_identifiers.h"
#import "ios/chrome/common/colors/semantic_color_names.h"
#include "ios/chrome/grit/ios_strings.h"
#include "ui/base/l10n/l10n_util_mac.h"
......@@ -80,7 +81,7 @@ NSString* GetMarkButtonTitleForSelectionState(ReadingListSelectionState state) {
target:nil
action:@selector(deleteSelectedReadingListItems)];
_deleteButton.accessibilityIdentifier = kReadingListToolbarDeleteButtonID;
_deleteButton.tintColor = [UIColor redColor];
_deleteButton.tintColor = [UIColor colorNamed:kRedColor];
_deleteAllReadButton = [[UIBarButtonItem alloc]
initWithTitle:l10n_util::GetNSString(
......@@ -90,7 +91,7 @@ NSString* GetMarkButtonTitleForSelectionState(ReadingListSelectionState state) {
action:@selector(deleteAllReadReadingListItems)];
_deleteAllReadButton.accessibilityIdentifier =
kReadingListToolbarDeleteAllReadButtonID;
_deleteAllReadButton.tintColor = [UIColor redColor];
_deleteAllReadButton.tintColor = [UIColor colorNamed:kRedColor];
_cancelButton = [[UIBarButtonItem alloc]
initWithTitle:l10n_util::GetNSString(IDS_IOS_READING_LIST_CANCEL_BUTTON)
......
......@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "ios/chrome/browser/ui/util/ui_util.h"
#import "ios/chrome/common/colors/semantic_color_names.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -60,10 +61,8 @@ const CGFloat kDefaultLabelHorizontalMargin = 8.5f;
[self addSubview:self.label];
self.didAddSubviews = YES;
[self activateConstraints];
[self setBackgroundColor:[UIColor colorWithRed:0.101
green:0.45
blue:0.909
alpha:0.1]];
[self setBackgroundColor:[[UIColor colorNamed:kBlueColor]
colorWithAlphaComponent:0.1]];
[self setAccessibilityLabel:self.label.text];
}
[super willMoveToSuperview:newSuperview];
......@@ -94,8 +93,7 @@ const CGFloat kDefaultLabelHorizontalMargin = 8.5f;
UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero];
[label
setFont:[UIFont systemFontOfSize:kFontSize weight:UIFontWeightSemibold]];
[label
setTextColor:[UIColor colorWithRed:0.101 green:0.45 blue:0.909 alpha:1]];
[label setTextColor:[UIColor colorNamed:kBlueColor]];
[label setTranslatesAutoresizingMaskIntoConstraints:NO];
[label setText:text];
[label setTextAlignment:NSTextAlignmentCenter];
......
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