Commit a3d0dbaf authored by Gayane Petrosyan's avatar Gayane Petrosyan Committed by Commit Bot

[NTP] Fix icon title color after doodle notifier clicked.

Fix by adding default values icon related properties to the default
theme background info.

After doodle notifier clicked
https://screenshot.googleplex.com/BwQAKd0qtPg.png

After doodle notifier clicked in dark mode
https://screenshot.googleplex.com/0qKA4iCTe6w.png

Bug: 968490
Change-Id: I70e9a9f2b1e2ce8ef61ba00ad1614a0a2eac674e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636347
Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665255}
parent 94d7c6ab
...@@ -46,18 +46,30 @@ function disableIframesAndVoiceSearchForTesting() { ...@@ -46,18 +46,30 @@ function disableIframesAndVoiceSearchForTesting() {
/** /**
* Specifications for an NTP design (not comprehensive). * Specifications for an NTP design (not comprehensive).
* *
* backgroundColor: The 4-component color of default background,
* darkBackgroundColor: The 4-component color of default dark background,
* iconBackgroundColor: The 4-component color of default dark icon background,
* iconDarkBackgroundColor: The 4-component color of default icon background,
* numTitleLines: Number of lines to display in titles. * numTitleLines: Number of lines to display in titles.
* titleColor: The 4-component color of title text. * titleColor: The 4-component color of title text.
* titleColorAgainstDark: The 4-component color of title text against a dark * titleColorAgainstDark: The 4-component color of title text against a dark
* theme. * theme.
* *
* @type {{ * @type {{
* backgroundColor: Array<number>,
* darkBackgroundColor: Array<number>,
* iconBackgroundColor: Array<number>,
* iconDarkBackgroundColor: Array<number>,
* numTitleLines: number, * numTitleLines: number,
* titleColor: Array<number>, * titleColor: Array<number>,
* titleColorAgainstDark: Array<number>, * titleColorAgainstDark: Array<number>,
* }} * }}
*/ */
const NTP_DESIGN = { const NTP_DESIGN = {
backgroundColor: [255, 255, 255, 255],
darkBackgroundColor: [50, 54, 57, 255],
iconBackgroundColor: [241, 243, 244, 255], /** GG100 */
iconDarkBackgroundColor: [32, 33, 36, 255], /** GG900 */
numTitleLines: 1, numTitleLines: 1,
titleColor: [60, 64, 67, 255], /** GG800 */ titleColor: [60, 64, 67, 255], /** GG800 */
titleColorAgainstDark: [248, 249, 250, 255], /** GG050 */ titleColorAgainstDark: [248, 249, 250, 255], /** GG050 */
...@@ -332,9 +344,19 @@ function getThemeBackgroundInfo() { ...@@ -332,9 +344,19 @@ function getThemeBackgroundInfo() {
return { return {
alternateLogo: false, alternateLogo: false,
backgroundColorRgba: backgroundColorRgba:
(isDarkModeEnabled ? [50, 54, 57, 255] : [255, 255, 255, 255]), (isDarkModeEnabled ? NTP_DESIGN.darkBackgroundColor :
NTP_DESIGN.backgroundColor),
customBackgroundConfigured: false,
iconBackgroundColor:
(isDarkModeEnabled ? NTP_DESIGN.iconDarkBackgroundColor :
NTP_DESIGN.iconBackgroundColor),
isNtpBackgroundDark: isDarkModeEnabled,
textColorLightRgba: [102, 102, 102, 255], textColorLightRgba: [102, 102, 102, 255],
textColorRgba: [0, 0, 0, 255], textColorRgba:
(isDarkModeEnabled ? NTP_DESIGN.titleColorAgainstDark :
NTP_DESIGN.titleColor),
useTitleContainer: false,
useWhiteAddIcon: isDarkModeEnabled,
usingDarkMode: isDarkModeEnabled, usingDarkMode: isDarkModeEnabled,
usingDefaultTheme: true, usingDefaultTheme: true,
}; };
......
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