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

Issue 92004: Fix focus rects for checkboxes and radio buttons:... (Closed)

Created:
11 years, 8 months ago by Ben Goodger (Google)
Modified:
9 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix focus rects for checkboxes and radio buttons: - add concept of default insets to view which get added to any other insets provided by the user. used by label to provide room for a focus border. - provide the ability for the label to paint its focus border even if it isn't focused. needed because the outer container (the checkbox) gets focus but the inner label does not, however the label knows best the location of its text around which the focus border must be drawn. please note: - also make it easier to click checkboxes by not resetting mouse_pressed_handler_ in RootView when a view decides it doesn't want to handle a drag. this is so we can still receive mousereleased notifications when the mouse is released... it's "difficult" to click checkboxes and radio buttons when you accidentally drag a little on their label. (this is the root view change). - fix slight alignment issue on the general page of options. Also fix a slight error in my last radio checkbox - clicking on a checked radio button should still focus it. http://crbug.com/10834 TEST=visit options, Minor Tweaks. click the "always ask before downloading" checkbox and observe that the focus rect tightly surrounds the text label instead of stretching to the right side of the dialog. Visit options, click an already-checked radio button. observe that it takes focus. Visit options, click on any checkbox or radio button, drag slightly then release (still within the bounds of the item). note the item is now toggled or selected. click down then drag out and release, note that it is not toggled or selected. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=14265

Patch Set 1 #

Total comments: 3

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -47 lines) Patch
M chrome/browser/views/options/general_page_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/gfx/insets.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/views/controls/button/checkbox.h View 1 3 chunks +8 lines, -5 lines 0 comments Download
M chrome/views/controls/button/checkbox.cc View 1 4 chunks +23 lines, -17 lines 0 comments Download
M chrome/views/controls/button/radio_button.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/views/controls/button/radio_button.cc View 1 1 chunk +7 lines, -6 lines 0 comments Download
M chrome/views/controls/label.h View 1 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/views/controls/label.cc View 1 2 4 chunks +26 lines, -9 lines 0 comments Download
M chrome/views/controls/label_unittest.cc View 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/views/view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/views/widget/root_view.cc View 1 1 chunk +1 line, -7 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Ben Goodger (Google)
this one is rich in nuance.
11 years, 8 months ago (2009-04-22 04:19:52 UTC) #1
sky
http://codereview.chromium.org/92004/diff/1/10 File chrome/views/controls/button/radio_button.cc (right): http://codereview.chromium.org/92004/diff/1/10#newcode90 Line 90: SetChecked(!checked()); !checked() has to be true to get ...
11 years, 8 months ago (2009-04-22 15:08:16 UTC) #2
Ben Goodger (Google)
Updated. On 2009/04/22 15:08:16, sky wrote: > http://codereview.chromium.org/92004/diff/1/10 > File chrome/views/controls/button/radio_button.cc (right): > > http://codereview.chromium.org/92004/diff/1/10#newcode90 ...
11 years, 8 months ago (2009-04-22 19:50:02 UTC) #3
sky
11 years, 8 months ago (2009-04-22 19:59:12 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698