Commit 31bd0fdb authored by Nazerke's avatar Nazerke Committed by Commit Bot

[iOS][dark mode] Clear browsing data page in history

The colors for the button and selected table cell are changed to the
right ones.

Bug: 995271
Change-Id: I988161221bbc46853672aace94132505beaab1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762221
Commit-Queue: Nazerke Kalidolda <nazerke@google.com>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarJavier Ernesto Flores Robles <javierrobles@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Auto-Submit: Nazerke Kalidolda <nazerke@google.com>
Cr-Commit-Position: refs/heads/master@{#689125}
parent 031db467
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #include "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h"
#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/util/uikit_ui_util.h" #include "ios/chrome/browser/ui/util/uikit_ui_util.h"
#import "ios/chrome/common/colors/semantic_color_names.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support." #error "This file requires ARC support."
...@@ -20,10 +21,6 @@ const CGFloat kImageTrailingPadding = 14; ...@@ -20,10 +21,6 @@ const CGFloat kImageTrailingPadding = 14;
const CGFloat kImageWidth = 30; const CGFloat kImageWidth = 30;
const CGFloat kImageHeight = 30; const CGFloat kImageHeight = 30;
// Tint color for cell's imageView when highlighted/selected.
const int kSelectedImageViewTintColor = 0x4285F4;
// Tint color for cell's imageView when unhighlighted/unselected.
const int kUnselectedImageViewTintColor = 0x9AA0A6;
} // namespace } // namespace
@implementation TableViewClearBrowsingDataItem @implementation TableViewClearBrowsingDataItem
...@@ -60,13 +57,13 @@ const int kUnselectedImageViewTintColor = 0x9AA0A6; ...@@ -60,13 +57,13 @@ const int kUnselectedImageViewTintColor = 0x9AA0A6;
- (void)setSelectedStyle:(TableViewClearBrowsingDataCell*)cell { - (void)setSelectedStyle:(TableViewClearBrowsingDataCell*)cell {
cell.backgroundView.backgroundColor = self.checkedBackgroundColor; cell.backgroundView.backgroundColor = self.checkedBackgroundColor;
cell.imageView.tintColor = UIColorFromRGB(kSelectedImageViewTintColor); cell.imageView.tintColor = [UIColor colorNamed:kBlueColor];
cell.accessoryType = UITableViewCellAccessoryCheckmark; cell.accessoryType = UITableViewCellAccessoryCheckmark;
} }
- (void)setUnselectedStyle:(TableViewClearBrowsingDataCell*)cell { - (void)setUnselectedStyle:(TableViewClearBrowsingDataCell*)cell {
cell.backgroundView.backgroundColor = nil; cell.backgroundView.backgroundColor = nil;
cell.imageView.tintColor = UIColorFromRGB(kUnselectedImageViewTintColor); cell.imageView.tintColor = [UIColor colorNamed:kGrey500Color];
cell.accessoryType = UITableViewCellAccessoryNone; cell.accessoryType = UITableViewCellAccessoryNone;
} }
...@@ -122,8 +119,7 @@ const int kUnselectedImageViewTintColor = 0x9AA0A6; ...@@ -122,8 +119,7 @@ const int kUnselectedImageViewTintColor = 0x9AA0A6;
_optionalTextLabel = [[UILabel alloc] init]; _optionalTextLabel = [[UILabel alloc] init];
_optionalTextLabel.numberOfLines = 0; _optionalTextLabel.numberOfLines = 0;
_optionalTextLabel.textColor = _optionalTextLabel.textColor = [UIColor colorNamed:kTextSecondaryColor];
UIColorFromRGB(kTableViewSecondaryLabelLightGrayTextColor);
_optionalTextLabel.translatesAutoresizingMaskIntoConstraints = NO; _optionalTextLabel.translatesAutoresizingMaskIntoConstraints = NO;
_optionalTextLabel.font = _optionalTextLabel.font =
[UIFont preferredFontForTextStyle:kTableViewSublabelFontStyle]; [UIFont preferredFontForTextStyle:kTableViewSublabelFontStyle];
...@@ -236,12 +232,12 @@ const int kUnselectedImageViewTintColor = 0x9AA0A6; ...@@ -236,12 +232,12 @@ const int kUnselectedImageViewTintColor = 0x9AA0A6;
} }
- (void)setHighlightedStyle { - (void)setHighlightedStyle {
self.imageView.tintColor = UIColorFromRGB(kSelectedImageViewTintColor); self.imageView.tintColor = [UIColor colorNamed:kBlueColor];
self.backgroundView.backgroundColor = self.highlightedBackgroundColor; self.backgroundView.backgroundColor = self.highlightedBackgroundColor;
} }
- (void)setUnhighlightedStyle { - (void)setUnhighlightedStyle {
self.imageView.tintColor = UIColorFromRGB(kUnselectedImageViewTintColor); self.imageView.tintColor = [UIColor colorNamed:kGrey500Color];
self.backgroundView.backgroundColor = nil; self.backgroundView.backgroundColor = nil;
} }
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#import "ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.h"
#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h"
#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h"
#import "ios/chrome/common/colors/semantic_color_names.h"
#include "ios/chrome/grit/ios_chromium_strings.h" #include "ios/chrome/grit/ios_chromium_strings.h"
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
...@@ -109,7 +110,7 @@ ...@@ -109,7 +110,7 @@
action:@selector(showClearBrowsingDataAlertController:)]; action:@selector(showClearBrowsingDataAlertController:)];
_clearBrowsingDataBarButton.accessibilityIdentifier = _clearBrowsingDataBarButton.accessibilityIdentifier =
kClearBrowsingDataButtonIdentifier; kClearBrowsingDataButtonIdentifier;
_clearBrowsingDataBarButton.tintColor = [UIColor redColor]; _clearBrowsingDataBarButton.tintColor = [UIColor colorNamed:kRedColor];
} }
return _clearBrowsingDataBarButton; return _clearBrowsingDataBarButton;
} }
......
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