Commit 5cf48d26 authored by Yulun Wu's avatar Yulun Wu Committed by Commit Bot

Enable color inversion for shelf tooltip bubble.

Spec:

https://www.figma.com/file/rQFGy3iAMfNdDnydTGkvHr/Style-%7C-Semantic-color-system-surface-theming?node-id=522%3A28

Bug: 1134432
Change-Id: I92ba9d50bdef74d1bff52db34019f7ca7f58ca79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508363Reviewed-by: default avatarMin Chen <minch@chromium.org>
Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825056}
parent e1f712f1
......@@ -4,6 +4,7 @@
#include "ash/shelf/shelf_tooltip_bubble.h"
#include "ash/style/ash_color_provider.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/wm/collision_detection/collision_detection_utils.h"
#include "ui/aura/window.h"
......@@ -48,8 +49,12 @@ ShelfTooltipBubble::ShelfTooltipBubble(views::View* anchor,
SetLayoutManager(std::make_unique<views::FillLayout>());
views::Label* label = new views::Label(text);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
const SkColor tooltip_background = SkColorSetA(gfx::kGoogleGrey900, 0xE6);
const SkColor tooltip_text = SkColorSetA(gfx::kGoogleGrey200, 0xFF);
// TODO (https://crbug.com/1146125) Enable inverted tooltip colors.
const SkColor tooltip_background = AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent80);
const SkColor tooltip_text = AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary);
set_color(tooltip_background);
label->SetEnabledColor(tooltip_text);
label->SetBackgroundColor(tooltip_background);
......
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