Commit 2649cfa5 authored by Yulun Wu's avatar Yulun Wu Committed by Chromium LUCI CQ

Live update for app list item view title colors.

ui/views/controls/label does not use themed colors from ash/style so
app_list_item_view should explicitly modify the color for title_.

Bug: 1139478
Change-Id: I590663a1c2e27c35f148a557017451c41d8db214
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627874
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843368}
parent d4243bdf
......@@ -896,6 +896,13 @@ void AppListItemView::OnGestureEvent(ui::GestureEvent* event) {
Button::OnGestureEvent(event);
}
void AppListItemView::OnThemeChanged() {
views::Button::OnThemeChanged();
title_->SetEnabledColor(AppListColorProvider::Get()->GetAppListItemTextColor(
apps_grid_view_->is_in_folder()));
SchedulePaint();
}
base::string16 AppListItemView::GetTooltipText(const gfx::Point& p) const {
// Use the label to generate a tooltip, so that it will consider its text
// truncation in making the tooltip. We do not want the label itself to have a
......
......@@ -123,6 +123,7 @@ class APP_LIST_EXPORT AppListItemView : public views::Button,
// views::Button overrides:
void OnGestureEvent(ui::GestureEvent* event) override;
void OnThemeChanged() override;
// views::View overrides:
base::string16 GetTooltipText(const gfx::Point& p) const override;
......
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