Skip to content

Commit

Permalink
[iOS] Update touch down color of swiftui popup rows.
Browse files Browse the repository at this point in the history
Use a new tertiary background color, which is not the same as the old
one.

(cherry picked from commit f0fa977)

Fixed: 1324975
Change-Id: Ibb5d93d67c7546d7f46a8f04cc07feb052dd9956
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3648185
Auto-Submit: Stepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: Robbie Gibson <rkgibson@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1003276}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650743
Reviewed-by: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/branch-heads/5060@{#44}
Cr-Branched-From: b83393d-refs/heads/main@{#1002911}
  • Loading branch information
Stepan Khapugin authored and Chromium LUCI CQ committed May 17, 2022
1 parent 7d11767 commit 3e4eada
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ struct PopupMatchRowView: View {
if isHighlighted {
LinearGradient(gradient: Colors.highlightingGradient, startPoint: .top, endPoint: .bottom)
} else if self.isPressed {
Color.tableRowViewHighlight
Color.updatedTertiaryBackground
}

button
Expand Down
5 changes: 5 additions & 0 deletions ios/chrome/common/ui/colors/Color+Chrome.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ extension Color {
return Color(kTertiaryBackgroundColor)
}

/// The updated tertiary background color
public static var updatedTertiaryBackground: Color {
return Color(kUpdatedTertiaryBackgroundColor)
}

/// The primary grouped background color.
public static var groupedPrimaryBackground: Color {
return Color(kGroupedPrimaryBackgroundColor)
Expand Down
5 changes: 5 additions & 0 deletions ios/chrome/common/ui/colors/resources/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ group("resources") {
":textfield_placeholder_color",
":toolbar_button_color",
":toolbar_shadow_color",
":updated_tertiary_background_color",
]
}

Expand Down Expand Up @@ -178,6 +179,10 @@ colorset("tertiary_background_color") {
sources = [ "tertiary_background_color.colorset/Contents.json" ]
}

colorset("updated_tertiary_background_color") {
sources = [ "updated_tertiary_background_color.colorset/Contents.json" ]
}

colorset("text_tertiary_color") {
sources = [ "text_tertiary_color.colorset/Contents.json" ]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"info": {
"version": 1,
"author": "xcode"
},
"colors": [
{
"idiom": "universal",
"color": {
"color-space": "display-p3",
"components": {
"alpha": "1.000",
"red": "0xDA",
"green": "0xDC",
"blue": "0xE0"
}
}
},
{
"idiom": "universal",
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"color": {
"color-space": "display-p3",
"components": {
"alpha": "1.000",
"red": "0x46",
"green": "0x4A",
"blue": "0x4E"
}
}
}
]
}
1 change: 1 addition & 0 deletions ios/chrome/common/ui/colors/semantic_color_names.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ extern NSString* const kSeparatorColor;
extern NSString* const kSolidButtonTextColor;
extern NSString* const kTableViewRowHighlightColor;
extern NSString* const kTertiaryBackgroundColor;
extern NSString* const kUpdatedTertiaryBackgroundColor;
extern NSString* const kTextPrimaryColor;
extern NSString* const kTextSecondaryColor;
extern NSString* const kTextTertiaryColor;
Expand Down
2 changes: 2 additions & 0 deletions ios/chrome/common/ui/colors/semantic_color_names.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
NSString* const kSolidButtonTextColor = @"solid_button_text_color";
NSString* const kTableViewRowHighlightColor = @"table_view_row_highlight_color";
NSString* const kTertiaryBackgroundColor = @"tertiary_background_color";
NSString* const kUpdatedTertiaryBackgroundColor =
@"updated_tertiary_background_color";
NSString* const kTextPrimaryColor = @"text_primary_color";
NSString* const kTextSecondaryColor = @"text_secondary_color";
NSString* const kTextTertiaryColor = @"text_tertiary_color";
Expand Down

0 comments on commit 3e4eada

Please sign in to comment.