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

Issue 15061006: views: Switch Checkbox over to LabelButton. (Closed)

Created:
7 years, 7 months ago by tfarina
Modified:
7 years, 7 months ago
Reviewers:
msw, Dan Beam, sky
CC:
chromium-reviews, tfarina, oshima+watch_chromium.org
Visibility:
Public.

Description

views: Switch Checkbox over to LabelButton. Rebase Checkbox and RadioButton on LabelButton. Uses new Checkbox and Radio Button image assets. (the classes previously used skia+native_theme) See before/after comparison at http://crbug.com/155363#c79 Note: Height on Linux is slightly reduced, now closer to Windows. BUG=155363 TEST=checkboxes and radio buttons look good in production, and in ash_shell "Examples Widgets" and "Views Examples" dialogs. R=msw@chromium.org,sky@chromium.org,dbeam@chromium.org COLLABORATOR=msw@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201740

Patch Set 1 #

Patch Set 2 : almost working - :p #

Total comments: 20

Patch Set 3 : add back GetExtraParams #

Patch Set 4 : add back GetThemePart #

Patch Set 5 : fix nits #

Patch Set 6 : add STATE_TOGGLED #

Patch Set 7 : set the image for STATE_TOGGLED #

Total comments: 10

Patch Set 8 : back with checked_ data member #

Patch Set 9 : review #

Total comments: 12

Patch Set 10 : changes #

Patch Set 11 : Get/SetFocusedImage() #

Patch Set 12 : override GetImage + SetCheckedImage #

Total comments: 10

Patch Set 13 : more review comments #

Total comments: 5

Patch Set 14 : SetCustomImage() #

Total comments: 16

Patch Set 15 : changes per review #

Total comments: 3

Patch Set 16 : more changes #

Patch Set 17 : Help polish Thiago's button changes - by msw. #

Patch Set 18 : Help polish Thiago's button changes - by msw. #

Patch Set 19 : Split out image asset addition; remove unwanted changes - by msw. #

Patch Set 20 : disabled images #

Total comments: 2

Patch Set 21 : fix padding-indentation #

Patch Set 22 : move STATE_DISABLED down the road #

Patch Set 23 : Tweak appearance; etc. - by msw. #

Patch Set 24 : Use new checked-while-disabled state assets - by msw. #

Patch Set 25 : Fix focus border placement and RTL alignment - by msw. #

Patch Set 26 : reuploading... #

Patch Set 27 : rm dcheck #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -214 lines) Patch
M chrome/browser/ui/views/autofill/autofill_dialog_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -4 lines 0 comments Download
M ui/views/controls/button/button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -2 lines 0 comments Download
M ui/views/controls/button/checkbox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +17 lines, -39 lines 0 comments Download
M ui/views/controls/button/checkbox.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +88 lines, -84 lines 0 comments Download
M ui/views/controls/button/label_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +12 lines, -6 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 6 chunks +65 lines, -56 lines 0 comments Download
M ui/views/controls/button/label_button_border.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -0 lines 0 comments Download
M ui/views/controls/button/label_button_border.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 4 chunks +6 lines, -11 lines 0 comments Download
M ui/views/controls/button/radio_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +42 lines, -3 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
msw
Now that's the kind of change that I'm talking about :) Great start! https://codereview.chromium.org/15061006/diff/10002/ui/views/controls/button/button.h File ...
7 years, 7 months ago (2013-05-13 01:37:22 UTC) #1
tfarina
I'll continue tomorrow night. https://codereview.chromium.org/15061006/diff/10002/ui/views/controls/button/button.h File ui/views/controls/button/button.h (right): https://codereview.chromium.org/15061006/diff/10002/ui/views/controls/button/button.h#newcode42 ui/views/controls/button/button.h:42: // TODO(msw): Add "Blue Button", ...
7 years, 7 months ago (2013-05-13 01:47:12 UTC) #2
tfarina
https://codereview.chromium.org/15061006/diff/10002/ui/views/controls/button/checkbox.h File ui/views/controls/button/checkbox.h (right): https://codereview.chromium.org/15061006/diff/10002/ui/views/controls/button/checkbox.h#newcode61 ui/views/controls/button/checkbox.h:61: // Sets/Gets whether or not the checkbox is checked. ...
7 years, 7 months ago (2013-05-13 02:28:31 UTC) #3
msw
How's this looking? Can you post before/after pics? https://codereview.chromium.org/15061006/diff/30001/ui/views/controls/button/button.h File ui/views/controls/button/button.h (right): https://codereview.chromium.org/15061006/diff/30001/ui/views/controls/button/button.h#newcode38 ui/views/controls/button/button.h:38: STATE_TOGGLED, ...
7 years, 7 months ago (2013-05-16 22:40:05 UTC) #4
tfarina
https://codereview.chromium.org/15061006/diff/30001/ui/views/controls/button/button.h File ui/views/controls/button/button.h (right): https://codereview.chromium.org/15061006/diff/30001/ui/views/controls/button/button.h#newcode38 ui/views/controls/button/button.h:38: STATE_TOGGLED, On 2013/05/16 22:40:05, msw wrote: > nit: I'd ...
7 years, 7 months ago (2013-05-18 00:54:08 UTC) #5
msw
More comments, let me know when you need another pass. Also, LMK if you have ...
7 years, 7 months ago (2013-05-18 01:04:56 UTC) #6
tfarina
https://codereview.chromium.org/15061006/diff/58010/ui/views/controls/button/checkbox.cc File ui/views/controls/button/checkbox.cc (right): https://codereview.chromium.org/15061006/diff/58010/ui/views/controls/button/checkbox.cc#newcode17 ui/views/controls/button/checkbox.cc:17: : LabelButton(NULL, label) { On 2013/05/18 01:04:56, msw wrote: ...
7 years, 7 months ago (2013-05-18 02:30:49 UTC) #7
msw
More comments, but relax this weekend, enjoy family time! https://codereview.chromium.org/15061006/diff/69005/ui/views/controls/button/checkbox.h File ui/views/controls/button/checkbox.h (right): https://codereview.chromium.org/15061006/diff/69005/ui/views/controls/button/checkbox.h#newcode38 ui/views/controls/button/checkbox.h:38: ...
7 years, 7 months ago (2013-05-18 03:46:30 UTC) #8
tfarina
https://codereview.chromium.org/15061006/diff/69005/ui/views/controls/button/checkbox.h File ui/views/controls/button/checkbox.h (right): https://codereview.chromium.org/15061006/diff/69005/ui/views/controls/button/checkbox.h#newcode38 ui/views/controls/button/checkbox.h:38: virtual const gfx::ImageSkia& GetImage(ButtonState for_state) OVERRIDE; On 2013/05/18 03:46:30, ...
7 years, 7 months ago (2013-05-18 18:43:23 UTC) #9
tfarina
https://codereview.chromium.org/15061006/diff/82001/ui/views/controls/button/checkbox.cc File ui/views/controls/button/checkbox.cc (right): https://codereview.chromium.org/15061006/diff/82001/ui/views/controls/button/checkbox.cc#newcode35 ui/views/controls/button/checkbox.cc:35: *rb.GetImageSkiaNamed(IDR_CHECKBOX_CHECKED_PRESSED)); We still need IDR_CHECKBOX_FOCUSED_CHECKED, IDR_CHECKBOX_FOCUSED_CHECKED_HOVER, IDR_CHECKBOX_FOCUSED_CHECKED_PRESSED. Where that ...
7 years, 7 months ago (2013-05-18 18:44:49 UTC) #10
msw
Please tell me there are no more button images we can't handle after this. https://codereview.chromium.org/15061006/diff/82001/ui/views/controls/button/checkbox.h ...
7 years, 7 months ago (2013-05-18 19:42:09 UTC) #11
tfarina
The behavior of those buttons are still broken. Looks dumb :( https://codereview.chromium.org/15061006/diff/82001/ui/views/controls/button/checkbox.h File ui/views/controls/button/checkbox.h (right): ...
7 years, 7 months ago (2013-05-18 21:10:33 UTC) #12
msw
If you follow my suggestions, it should work as expected. If anything, you *might* also ...
7 years, 7 months ago (2013-05-21 00:35:17 UTC) #13
tfarina
This isn't in an usable state. :( https://codereview.chromium.org/15061006/diff/90002/ui/views/controls/button/checkbox.cc File ui/views/controls/button/checkbox.cc (right): https://codereview.chromium.org/15061006/diff/90002/ui/views/controls/button/checkbox.cc#newcode23 ui/views/controls/button/checkbox.cc:23: SetImage(STATE_NORMAL, *rb.GetImageSkiaNamed(IDR_CHECKBOX)); ...
7 years, 7 months ago (2013-05-21 01:56:52 UTC) #14
msw
Glad to hear that it's looking alright; please include some screenshots after you address my ...
7 years, 7 months ago (2013-05-21 02:24:11 UTC) #15
tfarina
http://imgur.com/2DYw7wq Looks a bit better, but the transition of the states are pretty broken. You ...
7 years, 7 months ago (2013-05-21 02:50:53 UTC) #16
msw
https://codereview.chromium.org/15061006/diff/108004/ui/views/controls/button/checkbox.cc File ui/views/controls/button/checkbox.cc (right): https://codereview.chromium.org/15061006/diff/108004/ui/views/controls/button/checkbox.cc#newcode30 ui/views/controls/button/checkbox.cc:30: SetCustomImage(false, false, STATE_DISABLED, nit: remove the disabled comment and ...
7 years, 7 months ago (2013-05-22 00:36:10 UTC) #17
tfarina
https://codereview.chromium.org/15061006/diff/108004/ui/views/controls/button/checkbox.cc File ui/views/controls/button/checkbox.cc (right): https://codereview.chromium.org/15061006/diff/108004/ui/views/controls/button/checkbox.cc#newcode30 ui/views/controls/button/checkbox.cc:30: SetCustomImage(false, false, STATE_DISABLED, On 2013/05/22 00:36:10, msw wrote: > ...
7 years, 7 months ago (2013-05-22 03:03:59 UTC) #18
msw
Hey Scott, please take a look; thanks! Dan, please test autofill changes on Win and ...
7 years, 7 months ago (2013-05-22 04:08:27 UTC) #19
sky
LGTM
7 years, 7 months ago (2013-05-22 15:40:20 UTC) #20
msw
I uploaded Patch Set 25, which fixes RTL alignment and focus border placement (with custom ...
7 years, 7 months ago (2013-05-23 00:50:20 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/15061006/184001
7 years, 7 months ago (2013-05-23 00:52:46 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/15061006/211001
7 years, 7 months ago (2013-05-23 01:48:09 UTC) #23
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 7 months ago (2013-05-23 02:03:28 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/15061006/211001
7 years, 7 months ago (2013-05-23 02:07:06 UTC) #25
commit-bot: I haz the power
7 years, 7 months ago (2013-05-23 10:45:53 UTC) #26
Message was sent while issue was closed.
Change committed as 201740

Powered by Google App Engine
This is Rietveld 408576698