New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 665891 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Determine if TrayPopupItemStyle should depend on a NativeTheme

Project Member Reported by bruthig@chromium.org, Nov 16 2016

Issue description

Originally the TrayPopupItemStyle (TPIS) depended on a NativeTheme instance as the source of the colors.  However, it wasn't retrieving the correct colors for some reason so the TPIS was changed to hard code the values. See https://codereview.chromium.org/2496963004/.

We should re-consider whether the TPIS should depend on a NativeTheme and if so use it, and if not remove it as a dependency.
 

Comment 1 by est...@chromium.org, Nov 16 2016

We could probably accomplish much of what TrayPopupItemStyle does more implicitly by creating a special native theme for the tray bubble which overrides colors like kColorId_LabelEnabledColor. Controls like views::Label will pick up the correct color as long as we make sure to set their enabled/disabled state appropriately, and then we don't have to call label->SetEnabledColor(GetTextColor()); (it also seems like it's probably more appropriate to make a label disabled instead of leaving it "enabled" and changing the color).

But there's also this "inactive" color which isn't already part of NativeTheme, isn't a state for views::Label, and we may not want it to be if it's never applied elsewhere. (I'd be against adding something to NativeTheme that was only used on one platform, and a platform that always uses the same NativeTheme at that.)

Either way I think we want to remove NativeTheme. Even if we were to use it, to do so correctly would involve setting proper states on the Label and letting the label pick up the correct colors from NativeTheme on its own, i.e. NativeTheme would not be part of TrayPopupItemStyle.
Components: UI>Shell>StatusArea
Labels: Proj-MaterialDesign-CrOS M-57
I suggest punting to M-57, please speak up if anyone has objections.

Comment 3 by varkha@chromium.org, Nov 23 2016

I want to use kColorId_ProminentButtonColor (see bug 663451). Would you suggest hard-coding it in TPIS for now?
Cc: varkha@chromium.org
Yes, I would suggest hard coding in TPIS for now as we have done with the other colors.
Labels: Hotlist-Fixit

Comment 6 by est...@chromium.org, Nov 28 2016

you should use gfx::kGoogleBlue500 or ui::GetAuraColor(kColorId_ProminentButtonColor, nullptr);
Labels: -Hotlist-Fixit -M-57 M-58 OS-Chrome
Owner: est...@chromium.org
Status: Assigned (was: Available)
StatusAreaWidget::GetNativeTheme() also needs to have non-MD code removed, and I assume it is related to addressing this issue.
Project Member

Comment 8 by bugdroid1@chromium.org, Feb 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/99ef2a3d77b1586046212f8773dec294ac6db129

commit 99ef2a3d77b1586046212f8773dec294ac6db129
Author: estade <estade@chromium.org>
Date: Fri Feb 03 03:57:40 2017

Remove unused references to NativeTheme in TrayPopupItemStyle.

BUG= 665891 

Review-Url: https://codereview.chromium.org/2661023006
Cr-Commit-Position: refs/heads/master@{#447917}

[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/audio/audio_detailed_view.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/ime_menu/ime_list_view.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/network/network_list_md.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/network/tray_vpn.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/network/vpn_list_view.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/palette/palette_tray.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/power/power_status_view.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/power/power_status_view.h
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/screen_security/screen_tray_item.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/screen_security/screen_tray_item.h
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/tray_caps_lock.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/chromeos/tray_tracing.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/date/date_view.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/date/date_view.h
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/tray/hover_highlight_view.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/tray/tray_details_view.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/tray/tray_details_view.h
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/tray/tray_item_more.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/tray/tray_popup_item_style.cc
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/tray/tray_popup_item_style.h
[modify] https://crrev.com/99ef2a3d77b1586046212f8773dec294ac6db129/ash/common/system/update/tray_update.cc

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)

Sign in to add a comment