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

Issue 2396133005: [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (Closed)

Created:
4 years, 2 months ago by varkha
Modified:
4 years, 2 months ago
Reviewers:
bruthig, sadrul, Evan Stade
CC:
chromium-reviews, tfarina, bruthig+ink_drop_chromium.org, dcheng, Evan Stade
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[ash-md] Animates ToggleButton highlight to move it in sync with the thumb BUG=654116 Committed: https://crrev.com/52aea21592433931e8e612484284d8d4e65cf17e Cr-Commit-Position: refs/heads/master@{#425320}

Patch Set 1 #

Total comments: 4

Patch Set 2 : [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (thumb in its own layer) #

Total comments: 2

Patch Set 3 : [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (thumb view always exist… #

Total comments: 6

Patch Set 4 : [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (comments) #

Total comments: 6

Patch Set 5 : [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (simpler ctor and order … #

Patch Set 6 : [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (better destruction sequ… #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -46 lines) Patch
M ui/views/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/button/custom_button.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M ui/views/controls/button/custom_button_unittest.cc View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M ui/views/controls/button/toggle_button.h View 1 2 3 4 5 3 chunks +16 lines, -3 lines 0 comments Download
M ui/views/controls/button/toggle_button.cc View 1 2 3 4 5 6 chunks +121 lines, -42 lines 5 comments Download
A ui/views/controls/button/toggle_button_unittest.cc View 1 2 3 4 5 1 chunk +98 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (32 generated)
varkha
bruthig@, can you please take a first look? Thanks!
4 years, 2 months ago (2016-10-07 23:38:24 UTC) #4
bruthig
One comment, but otherwise looks good at a high level. https://codereview.chromium.org/2396133005/diff/1/ui/views/animation/ink_drop_host.h File ui/views/animation/ink_drop_host.h (right): https://codereview.chromium.org/2396133005/diff/1/ui/views/animation/ink_drop_host.h#newcode48 ...
4 years, 2 months ago (2016-10-08 22:44:46 UTC) #7
Evan Stade
https://codereview.chromium.org/2396133005/diff/1/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/1/ui/views/controls/button/toggle_button.cc#newcode104 ui/views/controls/button/toggle_button.cc:104: OffsetInkDropRipple(thumb_bounds.CenterPoint() - original_center_point_); I'm kind of skeptical this will ...
4 years, 2 months ago (2016-10-10 17:33:15 UTC) #9
varkha
Is this what you had in mind? https://codereview.chromium.org/2396133005/diff/1/ui/views/animation/ink_drop_host.h File ui/views/animation/ink_drop_host.h (right): https://codereview.chromium.org/2396133005/diff/1/ui/views/animation/ink_drop_host.h#newcode48 ui/views/animation/ink_drop_host.h:48: virtual void ...
4 years, 2 months ago (2016-10-12 00:44:59 UTC) #12
Evan Stade
pretty much https://codereview.chromium.org/2396133005/diff/20001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/20001/ui/views/controls/button/toggle_button.cc#newcode163 ui/views/controls/button/toggle_button.cc:163: new ToggleButton::ThumbView(ink_drop_layer, I was kind of expecting ...
4 years, 2 months ago (2016-10-12 00:46:55 UTC) #13
varkha
Good idea, PTAL. https://codereview.chromium.org/2396133005/diff/20001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/20001/ui/views/controls/button/toggle_button.cc#newcode163 ui/views/controls/button/toggle_button.cc:163: new ToggleButton::ThumbView(ink_drop_layer, On 2016/10/12 00:46:55, Evan ...
4 years, 2 months ago (2016-10-12 01:52:42 UTC) #15
bruthig
Two requests/notes otherwise lgtm https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc#newcode169 ui/views/controls/button/toggle_button.cc:169: CustomButton::AddInkDropLayer(ink_drop_layer); You shouldn't need to ...
4 years, 2 months ago (2016-10-12 13:38:09 UTC) #20
varkha
+sadrul for OWNERS in ui/views. https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc#newcode169 ui/views/controls/button/toggle_button.cc:169: CustomButton::AddInkDropLayer(ink_drop_layer); On 2016/10/12 13:38:09, ...
4 years, 2 months ago (2016-10-12 14:45:24 UTC) #21
varkha
+sadrul@ for OWNERS in ui/views. Thanks!
4 years, 2 months ago (2016-10-12 14:46:11 UTC) #23
sadrul
lgtm https://codereview.chromium.org/2396133005/diff/80001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/80001/ui/views/controls/button/toggle_button.cc#newcode42 ui/views/controls/button/toggle_button.cc:42: ThumbView(views::View* parent) : color_ratio_(0.) { explicit Or may ...
4 years, 2 months ago (2016-10-13 03:30:24 UTC) #28
varkha
https://codereview.chromium.org/2396133005/diff/80001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/80001/ui/views/controls/button/toggle_button.cc#newcode42 ui/views/controls/button/toggle_button.cc:42: ThumbView(views::View* parent) : color_ratio_(0.) { On 2016/10/13 03:30:23, sadrul ...
4 years, 2 months ago (2016-10-13 17:04:56 UTC) #31
bruthig
I think I forgot to post this... https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc#newcode176 ui/views/controls/button/toggle_button.cc:176: thumb_view_->RemoveInkDropLayer(ink_drop_layer); On ...
4 years, 2 months ago (2016-10-13 17:09:46 UTC) #32
varkha
On 2016/10/13 17:09:46, bruthig wrote: > I think I forgot to post this... > > ...
4 years, 2 months ago (2016-10-13 18:26:00 UTC) #35
varkha
https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/60001/ui/views/controls/button/toggle_button.cc#newcode176 ui/views/controls/button/toggle_button.cc:176: thumb_view_->RemoveInkDropLayer(ink_drop_layer); On 2016/10/13 17:09:46, bruthig wrote: > On 2016/10/12 ...
4 years, 2 months ago (2016-10-13 23:07:35 UTC) #39
bruthig
lgtm On another note though, I think this destruction tear down issue is a problem ...
4 years, 2 months ago (2016-10-14 14:23:22 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2396133005/140001
4 years, 2 months ago (2016-10-14 14:39:14 UTC) #47
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 2 months ago (2016-10-14 14:45:24 UTC) #48
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/52aea21592433931e8e612484284d8d4e65cf17e Cr-Commit-Position: refs/heads/master@{#425320}
4 years, 2 months ago (2016-10-14 14:46:58 UTC) #50
Evan Stade
https://codereview.chromium.org/2396133005/diff/140001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/140001/ui/views/controls/button/toggle_button.cc#newcode45 ui/views/controls/button/toggle_button.cc:45: void AddInkDropLayer(ui::Layer* ink_drop_layer) { if ThumbView were an InkDropHostView ...
4 years, 2 months ago (2016-10-17 15:37:58 UTC) #51
varkha
https://codereview.chromium.org/2396133005/diff/140001/ui/views/controls/button/toggle_button.cc File ui/views/controls/button/toggle_button.cc (right): https://codereview.chromium.org/2396133005/diff/140001/ui/views/controls/button/toggle_button.cc#newcode45 ui/views/controls/button/toggle_button.cc:45: void AddInkDropLayer(ui::Layer* ink_drop_layer) { On 2016/10/17 15:37:58, Evan Stade ...
4 years, 2 months ago (2016-10-17 16:12:53 UTC) #52
Evan Stade
4 years, 2 months ago (2016-10-18 13:13:16 UTC) #53
Message was sent while issue was closed.
https://codereview.chromium.org/2396133005/diff/140001/ui/views/controls/butt...
File ui/views/controls/button/toggle_button.cc (right):

https://codereview.chromium.org/2396133005/diff/140001/ui/views/controls/butt...
ui/views/controls/button/toggle_button.cc:45: void AddInkDropLayer(ui::Layer*
ink_drop_layer) {
On 2016/10/17 16:12:53, varkha wrote:
> On 2016/10/17 15:37:58, Evan Stade (ooo till 10-20) wrote:
> > if ThumbView were an InkDropHostView could we not remove this?
> 
> Yes, but this would mean we would have to fix the targeting in some way. Today
> clicking on a toggle outside the thumb activates the ripple which I find a
good
> behavior. We could of course make the thumb as big as the toggle button but
then
> we would need to complicate by animating position through painting the thumb
in
> a right spot rather than simply changing the thumb bounds.

I didn't mean to replace the ToggleButton as the InkDropHostView, I meant making
this an InkDropHostView as well so that we didn't have to reimplement these
functions.

Powered by Google App Engine
This is Rietveld 408576698