Commit 24a94c74 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Adjust text color of the tools menu

This CL adjusts the color of the elements of the tools menu when they
are enabled.

Bug: 824210
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I7aaca16482f40a97dfe713a1847e25ea697103f9
Reviewed-on: https://chromium-review.googlesource.com/997818Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548445}
parent 5fccc9de
......@@ -15,6 +15,7 @@ source_set("cells") {
]
deps = [
"//base",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/reading_list:reading_list_ui",
"//ios/chrome/browser/ui/table_view:styler",
"//ios/chrome/browser/ui/table_view/cells",
......
......@@ -10,6 +10,7 @@
#import "ios/chrome/browser/ui/reading_list/number_badge_view.h"
#import "ios/chrome/browser/ui/reading_list/text_badge_view.h"
#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
#import "ios/chrome/browser/ui/util/constraints_ui_util.h"
#import "ios/chrome/common/material_timing.h"
......@@ -18,13 +19,14 @@
#endif
namespace {
const int kEnabledColor = 0x1A73E8;
const CGFloat kImageLength = 28;
const CGFloat kCellHeight = 44;
const CGFloat kInnerMargin = 11;
const CGFloat kMargin = 15;
const CGFloat kTopMargin = 8;
const CGFloat kTopMarginBadge = 14;
}
} // namespace
@implementation PopupMenuToolsItem
......@@ -236,8 +238,8 @@ const CGFloat kTopMarginBadge = 14;
- (void)setUserInteractionEnabled:(BOOL)userInteractionEnabled {
[super setUserInteractionEnabled:userInteractionEnabled];
if (userInteractionEnabled) {
self.titleLabel.textColor = self.tintColor;
self.imageView.tintColor = self.tintColor;
self.titleLabel.textColor = UIColorFromRGB(kEnabledColor);
self.imageView.tintColor = UIColorFromRGB(kEnabledColor);
} else {
self.titleLabel.textColor = [[self class] disabledColor];
self.imageView.tintColor = [[self class] disabledColor];
......
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