Commit 3f4fcf06 authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[Payment Request][Desktop] Add dark mode Chrome logo.

Before this patch, Chrome in dark mode (on desktop) would display light
gray "chrome" text on dark gray background in the payment sheet. The
text was not readable.

This patch adds the white text logo and uses it when the dark mode is
enabled.

After this patch, Chrome in dark mode displays white "chrome" text on
dark gray background. This is readable.

Bug: 959880
Change-Id: I8d705cddebbb9b7bd01c433c7fbee9721520185f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594348Reviewed-by: default avatarMitsuru Oshima (slow - gardening) <oshima@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659183}
parent dbb46a68
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/product_logo_32.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/product_logo_32.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_WHITE" file="chromium/product_logo_white.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_WHITE" file="chromium/product_logo_white.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="chromium/product_logo_name_22.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="chromium/product_logo_name_22.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22_WHITE" file="chromium/product_logo_name_22_white.png" />
</if> </if>
<if expr="_google_chrome"> <if expr="_google_chrome">
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/product_logo_16.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/product_logo_16.png" />
...@@ -163,6 +164,7 @@ ...@@ -163,6 +164,7 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="google_chrome/product_logo_32_dev.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="google_chrome/product_logo_32_dev.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_WHITE" file="google_chrome/product_logo_white.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_WHITE" file="google_chrome/product_logo_white.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="google_chrome/product_logo_name_22.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="google_chrome/product_logo_name_22.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22_WHITE" file="google_chrome/product_logo_name_22_white.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_ENTERPRISE" file="google_chrome/product_logo_enterprise.png" /> <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_ENTERPRISE" file="google_chrome/product_logo_enterprise.png" />
</if> </if>
......
...@@ -283,8 +283,11 @@ std::unique_ptr<views::View> CreateProductLogoFooterView() { ...@@ -283,8 +283,11 @@ std::unique_ptr<views::View> CreateProductLogoFooterView() {
std::unique_ptr<views::ImageView> chrome_logo = std::unique_ptr<views::ImageView> chrome_logo =
std::make_unique<views::ImageView>(); std::make_unique<views::ImageView>();
chrome_logo->set_can_process_events_within_subtree(false); chrome_logo->set_can_process_events_within_subtree(false);
chrome_logo->SetImage(ui::ResourceBundle::GetSharedInstance() chrome_logo->SetImage(
.GetImageNamed(IDR_PRODUCT_LOGO_NAME_22) ui::ResourceBundle::GetSharedInstance()
.GetImageNamed(content_view->GetNativeTheme()->SystemDarkModeEnabled()
? IDR_PRODUCT_LOGO_NAME_22_WHITE
: IDR_PRODUCT_LOGO_NAME_22)
.AsImageSkia()); .AsImageSkia());
chrome_logo->set_tooltip_text(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); chrome_logo->set_tooltip_text(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
content_view->AddChildView(chrome_logo.release()); content_view->AddChildView(chrome_logo.release());
......
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