New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 652492 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 615892



Sign in to add a comment

ToggleButton should have focus rectangle

Project Member Reported by varkha@chromium.org, Oct 3 2016

Issue description

sgabriel@, estade@, I think it would be good to have the same implementation as in ImageButton::SetFocusPainter so that when we get to adjust the color and stroke for the spec we can have the same starting point. Comments?
Labels: -OS-Chrome
Not sure I understood #1.
we should be able to use a painter to make the painting code shared between all these controls, but the code for ToggleButton is going to just be a couple extra lines in ToggleButton::OnPaint (there's no need to allow for a settable focus painter a la ImageView).
#3, that's precisely what I meant.
Blocking: 615892
Labels: -M-55 M-56

Comment 7 by varkha@chromium.org, Nov 17 2016

Labels: OS-Chrome
Owner: varkha@chromium.org
Status: Started (was: Available)
Have a draft CL at https://codereview.chromium.org/2509943002.

Comment 8 by varkha@chromium.org, Nov 17 2016

Another draft at https://codereview.chromium.org/2506133003.
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9bd7f8c886e2b6131646b78d7598d2115894b385

commit 9bd7f8c886e2b6131646b78d7598d2115894b385
Author: varkha <varkha@chromium.org>
Date: Sat Nov 19 02:33:43 2016

[ash-md] Allows ToggleButton to have a border and adds focus rectangle

- Allows ToggleButton to accept a border set externally.
- Allows ToggleButton to have a tooltip that includes ThumbView.
- Adds TrayPopupUtils::CreateToggleButton to set up ToggleButtons for
  use in system menu.
- Uses TrayPopupUtils::CreateToggleButton in IME, Bluetooth and Network
  pages.

BUG= 652492 
TEST=manual
  Bring focus using Tab to a toggle button in Network detailed page.
  (focus rectangle appears).
  Press Space (toggle switches)
  Press Enter (toggle switches)
  Tab (focus switches to the next row).

Review-Url: https://codereview.chromium.org/2506133003
Cr-Commit-Position: refs/heads/master@{#433386}

[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ash/common/system/chromeos/ime_menu/ime_list_view.cc
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ash/common/system/chromeos/network/network_list_md.cc
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ash/common/system/tray/tray_constants.cc
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ash/common/system/tray/tray_constants.h
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ash/common/system/tray/tray_popup_utils.cc
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ash/common/system/tray/tray_popup_utils.h
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ui/views/controls/button/toggle_button.cc
[modify] https://crrev.com/9bd7f8c886e2b6131646b78d7598d2115894b385/ui/views/controls/button/toggle_button.h

Labels: Merge-Request-56
This was a visible change intended to go with other MD changes in M-56 Chrome OS system menu. Requesting a merge.

Comment 11 by dimu@chromium.org, Nov 20 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)
Project Member

Comment 12 by bugdroid1@chromium.org, Nov 21 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7061f7f5af36c3d2647f7179a4567493a97648d0

commit 7061f7f5af36c3d2647f7179a4567493a97648d0
Author: Valery Arkhangorodsky <varkha@chromium.org>
Date: Mon Nov 21 03:35:30 2016

[ash-md] Allows ToggleButton to have a border and adds focus rectangle

- Allows ToggleButton to accept a border set externally.
- Allows ToggleButton to have a tooltip that includes ThumbView.
- Adds TrayPopupUtils::CreateToggleButton to set up ToggleButtons for
  use in system menu.
- Uses TrayPopupUtils::CreateToggleButton in IME, Bluetooth and Network
  pages.

BUG= 652492 
TEST=manual
  Bring focus using Tab to a toggle button in Network detailed page.
  (focus rectangle appears).
  Press Space (toggle switches)
  Press Enter (toggle switches)
  Tab (focus switches to the next row).

Review-Url: https://codereview.chromium.org/2506133003
Cr-Commit-Position: refs/heads/master@{#433386}
(cherry picked from commit 9bd7f8c886e2b6131646b78d7598d2115894b385)

Review URL: https://codereview.chromium.org/2520793002 .

Cr-Commit-Position: refs/branch-heads/2924@{#17}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ash/common/system/chromeos/ime_menu/ime_list_view.cc
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ash/common/system/chromeos/network/network_list_md.cc
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ash/common/system/tray/tray_constants.cc
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ash/common/system/tray/tray_constants.h
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ash/common/system/tray/tray_popup_utils.cc
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ash/common/system/tray/tray_popup_utils.h
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ui/views/controls/button/toggle_button.cc
[modify] https://crrev.com/7061f7f5af36c3d2647f7179a4567493a97648d0/ui/views/controls/button/toggle_button.h

Status: Fixed (was: Started)
Status: Verified (was: Fixed)

Sign in to add a comment