Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Issue 2832223003: Update profile switcher button on Linux. (Closed)

Created:
3 years, 8 months ago by Evan Stade
Modified:
3 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, tfarina
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update profile switcher button on Linux. This is limited to Linux because it draws the avatar button to match Linux caption buttons, but it can be enabled for custom themed browser windows on Windows as well after we write a drawing routine that looks appropriate next to those buttons. 1. Draw the button without the use of assets (scale better at larger scale factors). 2. Improve vertical centering of text. 3. Use ink drop highlight/ripple for interactions. 4. Keep active state going while profile switcher widget is open. 5. Apply same bg color as caption buttons. BUG=591586

Patch Set 1 #

Patch Set 2 : stroke width is crucial #

Patch Set 3 : . #

Patch Set 4 : mask #

Patch Set 5 : self review #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -15 lines) Patch
M chrome/app/theme/theme_resources.grd View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/profiles/new_avatar_button.h View 1 2 3 3 chunks +10 lines, -4 lines 1 comment Download
M chrome/browser/ui/views/profiles/new_avatar_button.cc View 1 2 3 4 7 chunks +97 lines, -2 lines 3 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_host_view.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_host_view.cc View 1 2 3 2 chunks +10 lines, -3 lines 0 comments Download
M ui/views/animation/ink_drop_mask.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M ui/views/animation/ink_drop_mask.cc View 1 2 3 2 chunks +2 lines, -2 lines 2 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 1 chunk +2 lines, -0 lines 2 comments Download

Messages

Total messages: 8 (5 generated)
Evan Stade
https://codereview.chromium.org/2832223003/diff/80001/chrome/browser/ui/views/profiles/new_avatar_button.cc File chrome/browser/ui/views/profiles/new_avatar_button.cc (right): https://codereview.chromium.org/2832223003/diff/80001/chrome/browser/ui/views/profiles/new_avatar_button.cc#newcode205 chrome/browser/ui/views/profiles/new_avatar_button.cc:205: return SK_ColorWHITE; I stuck with white because the theme-colored ...
3 years, 8 months ago (2017-04-26 19:24:49 UTC) #6
Peter Kasting
https://codereview.chromium.org/2832223003/diff/80001/chrome/browser/ui/views/profiles/new_avatar_button.cc File chrome/browser/ui/views/profiles/new_avatar_button.cc (right): https://codereview.chromium.org/2832223003/diff/80001/chrome/browser/ui/views/profiles/new_avatar_button.cc#newcode74 chrome/browser/ui/views/profiles/new_avatar_button.cc:74: // There's a second, light stroke that matches the ...
3 years, 8 months ago (2017-04-27 02:13:18 UTC) #7
Evan Stade
3 years, 7 months ago (2017-04-27 20:28:52 UTC) #8
Thanks for looking. I'll come back to this and address your concerns after emx's
patch lands and I rebase on top of it.

https://codereview.chromium.org/2832223003/diff/80001/ui/views/animation/ink_...
File ui/views/animation/ink_drop_mask.cc (right):

https://codereview.chromium.org/2832223003/diff/80001/ui/views/animation/ink_...
ui/views/animation/ink_drop_mask.cc:51: gfx::RectF bounds(layer()->bounds());
On 2017/04/27 02:13:18, Peter Kasting wrote:
> Nit: I think this should have stayed as = per
>
https://www.chromium.org/developers/coding-style/cpp-dos-and-donts#TOC-Variab...

can't do that for rect=>rectf

https://codereview.chromium.org/2832223003/diff/80001/ui/views/controls/butto...
File ui/views/controls/button/label_button.cc (right):

https://codereview.chromium.org/2832223003/diff/80001/ui/views/controls/butto...
ui/views/controls/button/label_button.cc:426:
InstallInkDropMask(ink_drop_layer);
On 2017/04/27 02:13:18, Peter Kasting wrote:
> It looks from code search like several other places called AddInkDropLayer()
> besides just here.  Don't you need to modify them too?  (For example,
> BubbleIconView)

They would need this if they were to use a mask, but I don't want to hunt them
all down. Adding this here doesn't make them any less (hypothetically) broken.

Removing the code but not adding back InstallInkDropMask() in InkDropHostView
was an oversight.

Powered by Google App Engine
This is Rietveld 408576698