Commit 224c2397 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][DarkMode] Support dark color in separator

Creates a local colorset for the separator.

Bug: 976645
Change-Id: I8e5168c18fe01095537c4d34cdba151db11f2d37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735162Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684263}
parent 92a9fc4a
......@@ -10,6 +10,7 @@ source_set("cells") {
"popup_menu_item.h",
]
deps = [
"resources:popup_menu_separator_color",
"//ios/chrome/browser/ui/table_view/cells",
]
libs = [ "UIKit.framework" ]
......
......@@ -42,7 +42,8 @@ const CGFloat kSeparatorMargin = 12;
if (self) {
UIView* separator = [[UIView alloc] init];
separator.translatesAutoresizingMaskIntoConstraints = NO;
separator.backgroundColor = [UIColor colorWithWhite:0 alpha:0.05];
separator.backgroundColor =
[UIColor colorNamed:@"popup_menu_separator_color"];
[self.contentView addSubview:separator];
[NSLayoutConstraint activateConstraints:@[
[separator.heightAnchor constraintEqualToConstant:kSeparatorHeight],
......
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ios/asset_catalog.gni")
colorset("popup_menu_separator_color") {
sources = [
"popup_menu_separator_color.colorset/Contents.json",
]
}
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "display-p3",
"components" : {
"red" : "0xE8",
"alpha" : "1.000",
"blue" : "0xEC",
"green" : "0xEA"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "display-p3",
"components" : {
"red" : "0x47",
"alpha" : "1.000",
"blue" : "0x50",
"green" : "0x4C"
}
}
}
]
}
\ No newline at end of file
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