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

Side by Side Diff: ash/system/tray/tray_popup_label_button.cc

Issue 78803002: Fixing focus highlight on high DPI devices for accessibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_popup_label_button.h ('k') | ui/app_list/views/folder_header_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/tray/tray_popup_label_button.h" 5 #include "ash/system/tray/tray_popup_label_button.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/system/tray/tray_popup_label_button_border.h" 8 #include "ash/system/tray/tray_popup_label_button_border.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
11 11
12 namespace ash { 12 namespace ash {
13 namespace internal { 13 namespace internal {
14 14
15 TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener, 15 TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener,
16 const base::string16& text) 16 const base::string16& text)
17 : views::LabelButton(listener, text) { 17 : views::LabelButton(listener, text) {
18 set_border(new TrayPopupLabelButtonBorder); 18 set_border(new TrayPopupLabelButtonBorder);
19 set_focusable(true); 19 set_focusable(true);
20 set_request_focus_on_press(false); 20 set_request_focus_on_press(false);
21 set_animate_on_state_change(false); 21 set_animate_on_state_change(false);
22 SetHorizontalAlignment(gfx::ALIGN_CENTER); 22 SetHorizontalAlignment(gfx::ALIGN_CENTER);
23 set_focus_border(views::FocusBorder::CreateSolidFocusBorder(
24 kFocusBorderColor,
25 gfx::Insets(1, 1, 2, 2)));
23 } 26 }
24 27
25 TrayPopupLabelButton::~TrayPopupLabelButton() {} 28 TrayPopupLabelButton::~TrayPopupLabelButton() {}
26 29
27 void TrayPopupLabelButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
28 if (HasFocus()) {
29 canvas->DrawRect(gfx::Rect(1, 1, width() - 3, height() - 3),
30 ash::kFocusBorderColor);
31 }
32 }
33
34 } // namespace internal 30 } // namespace internal
35 } // namespace ash 31 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_popup_label_button.h ('k') | ui/app_list/views/folder_header_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698