Profile button default avatar doesn't work well with themes |
|||||||||||||||
Issue descriptionSince we hard-code the color of this icon, it's invisible on dark themes. Currently this only matters for Linux but we'd like to update themed browser windows on Windows as well.
,
May 19 2017
Issue 724373 has been merged into this issue.
,
May 19 2017
Ideally, the avatar button icon is painted in the same way the window controls are. Do you need a black svg from me?
,
May 19 2017
The window controls in this screenshot are PNGs. The shapes have a white fill and dark outline. I believe this dark color was actually chosen to match a light Win10 bg. I'm going to try what Peter suggests, although I'm not sure it's as easy as he's making it sound as we can't tell what the frame will look like in the case where a custom theme uses an image for the frame. Win10 has solid frame colors AFAIU. I initially assigned to you Alan for a design decision on how to deal with this.
,
May 19 2017
Bret's code was designed to work with themed window frames. It overlays a semitransparent solid color on the caption buttons to ensure there's something there for the glyph color to contrast against no matter what the image looks like.
,
May 19 2017
can you point me at this code? Is it this?[1] We don't currently use this semi transparent bg on the caption buttons on Linux as far as I can tell, and I don't know if we can add it since we're still using raster assets there. We could add it to just the avatar but that will mean that button looks substantially unlike the others. [1] https://cs.chromium.org/chromium/src/chrome/browser/ui/views/frame/windows_10_caption_button.cc?rcl=b8213899699b5b98f778b5a418d889fa25dc96dc&l=49
,
May 19 2017
Yes, it's that code. You can blend atop the raster assets (we used to do this for tabs in the tabstrip before top chrome MD). There's also bug 644004 on doing all this stuff in general for the caption buttons and profile switcher on all platforms. (I'm a bit confused about the different bugs we have here and how they overlap, but the end state we want is to be drawing the profile switcher like we draw the caption buttons, and to draw the caption buttons with some kind of consistent behavior like this that handles themes well, modulated by platform conventions as needed.)
,
May 24 2017
After messing with this for a while, changing the color of the icon doesn't seem like the best option. No matter how smart we are about the color, it will not match the caption buttons which are always solid white with a grey outline. Here's a screenshot of what I landed on, shown on a variety of themes. Two major changes (both of which only apply to Linux): - icon is white with with a grey outline. - button background actually matches the theme (this was never previously the case AFAICT).
,
May 25 2017
Yeah, if your caption button glyphs don't also change, then your profile button "glyph" (icon) can't either. It definitely should match them. What you've done seems good to me for now, albeit it won't match how we solve this on Windows. I think longer-term it might be nice to have the caption button glyphs _and_ this icon not be white-with-black-outline, but be dynamically colored. However, I don't know the typical caption button look on Linux well enough to know if that makes sense.
,
May 25 2017
Even longer term, it seems hard to settle on one color without an outline for the themed case, because themes can define either a color or an image or both for the button bg and frame. If the theme only defines images, the bg colors won't help us determine a good fg color. I think on Windows it was only solved for the unthemed case, right? The frame may change color but you'll at least be able to tell what the color is.
,
May 25 2017
As with the tabstrip, we depend on themes setting the frame color to a reasonable approximation of the frame image's color when they define a frame image. If they don't do this, they'll look broken, and we're OK with that. So for Windows this was solved for the themed case, and when we tested with a variety of themes, it works fairly well in practice. We could go further than this if we wanted to be forgiving to theme authors, and compute an "average" or "dominant" color from the frame image in the case where authors set that but not also the frame color. I thought we had code to do that computation on an image somewhere anyway. I consider that a "nice-to-have" though.
,
May 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0b5abf2881817f9cba31ac3d6ba7d50d01924d78 commit 0b5abf2881817f9cba31ac3d6ba7d50d01924d78 Author: Evan Stade <estade@chromium.org> Date: Fri May 26 15:53:21 2017 Linux: Improve avatar button for themed browser windows. 1. Draw fill color/image on avatar button. Some themes use a color, some have an image, or they can have both. 2. Make generic avatar icon white with a grey outline, just like the caption button icons. BUG= 722595 Change-Id: Ie05f2de9e677be2f04190ef8043e62bc4c1a7d73 Reviewed-on: https://chromium-review.googlesource.com/514448 Reviewed-by: Peter Kasting <pkasting@chromium.org> Commit-Queue: Evan Stade <estade@chromium.org> Cr-Commit-Position: refs/heads/master@{#475013} [modify] https://crrev.com/0b5abf2881817f9cba31ac3d6ba7d50d01924d78/chrome/app/vector_icons/BUILD.gn [add] https://crrev.com/0b5abf2881817f9cba31ac3d6ba7d50d01924d78/chrome/app/vector_icons/profile_switcher_outline.icon [modify] https://crrev.com/0b5abf2881817f9cba31ac3d6ba7d50d01924d78/chrome/browser/ui/views/profiles/avatar_button.cc
,
May 26 2017
,
Jun 14 2017
,
Jun 14 2017
,
Jun 14 2017
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 16 2017
We're pretty late into M60 and cracking down on merges for this milestone, I'd prefer to wait until M61. If this is a critical bug that can't wait until M61, feel free to add back the Merge-Request-60 label and justification/reasoning why this should be considered for 60 and we'll re-review.
,
Jun 16 2017
This is a low risk change that has baked for a long time without causing any known crashes. The bug is a pretty bad graphical glitch (see screenshot here[1]). It only missed the branch by a handful of hours, so the chances that it has a bad interaction with an earlier state of the tree are pretty low. [1] https://bugs.chromium.org/p/chromium/issues/detail?id=733021#c5
,
Jun 16 2017
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 18 2017
Based on comment 18, approving merge to M60.
,
Jun 22 2017
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible! If all merges have been completed, please remove any remaining Merge-Approved labels from this issue. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 26 2017
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible! If all merges have been completed, please remove any remaining Merge-Approved labels from this issue. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 10 2017
Please merge this to M60 ASAP. branch:3112
,
Jul 10 2017
sorry, I've been ooo. Merged just now.
,
Jul 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6c6ae718a608333d1954682b88e9988f51d64be7 commit 6c6ae718a608333d1954682b88e9988f51d64be7 Author: Evan Stade <estade@chromium.org> Date: Mon Jul 10 16:23:25 2017 Linux: Improve avatar button for themed browser windows. 1. Draw fill color/image on avatar button. Some themes use a color, some have an image, or they can have both. 2. Make generic avatar icon white with a grey outline, just like the caption button icons. BUG= 722595 TBR=estade@chromium.org (cherry picked from commit 0b5abf2881817f9cba31ac3d6ba7d50d01924d78) Change-Id: Ie05f2de9e677be2f04190ef8043e62bc4c1a7d73 Reviewed-on: https://chromium-review.googlesource.com/514448 Reviewed-by: Peter Kasting <pkasting@chromium.org> Commit-Queue: Evan Stade <estade@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#475013} Reviewed-on: https://chromium-review.googlesource.com/565105 Reviewed-by: Evan Stade <estade@chromium.org> Cr-Commit-Position: refs/branch-heads/3112@{#556} Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897} [modify] https://crrev.com/6c6ae718a608333d1954682b88e9988f51d64be7/chrome/app/vector_icons/BUILD.gn [add] https://crrev.com/6c6ae718a608333d1954682b88e9988f51d64be7/chrome/app/vector_icons/profile_switcher_outline.icon [modify] https://crrev.com/6c6ae718a608333d1954682b88e9988f51d64be7/chrome/browser/ui/views/profiles/avatar_button.cc
,
Jul 12 2017
Tested this issue on Ubuntu 14.04 with chrome #60.0.3112.66, observed that avatar icon is filled with white color, Attaching the screenshot for reference. estade@ could you please look into it and confirm that this is the expected behavior of this fix.
,
Jul 12 2017
lgtm |
|||||||||||||||
►
Sign in to add a comment |
|||||||||||||||
Comment 1 by pkasting@chromium.org
, May 15 2017