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

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

Issue 10086005: ash: Show better focus rects for the tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_views.h" 5 #include "ash/system/tray/tray_views.h"
6 6
7 #include "ash/system/tray/tray_constants.h" 7 #include "ash/system/tray/tray_constants.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "grit/ash_strings.h" 9 #include "grit/ash_strings.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 event.key_code() == ui::VKEY_RETURN) { 58 event.key_code() == ui::VKEY_RETURN) {
59 return PerformAction(event); 59 return PerformAction(event);
60 } 60 }
61 return false; 61 return false;
62 } 62 }
63 63
64 bool ActionableView::OnMousePressed(const views::MouseEvent& event) { 64 bool ActionableView::OnMousePressed(const views::MouseEvent& event) {
65 return PerformAction(event); 65 return PerformAction(event);
66 } 66 }
67 67
68 void ActionableView::OnPaintFocusBorder(gfx::Canvas* canvas) {
69 if (HasFocus() && (focusable() || IsAccessibilityFocusable())) {
70 canvas->DrawRect(gfx::Rect(1, 1, width() - 3, height() - 3),
71 kFocusBorderColor);
72 }
73 }
74
68 //////////////////////////////////////////////////////////////////////////////// 75 ////////////////////////////////////////////////////////////////////////////////
69 // HoverHighlightView 76 // HoverHighlightView
70 77
71 HoverHighlightView::HoverHighlightView(ViewClickListener* listener) 78 HoverHighlightView::HoverHighlightView(ViewClickListener* listener)
72 : listener_(listener), 79 : listener_(listener),
73 highlight_color_(kHoverBackgroundColor), 80 highlight_color_(kHoverBackgroundColor),
74 default_color_(0), 81 default_color_(0),
75 hover_(false) { 82 hover_(false) {
76 set_notify_enter_exit_on_child(true); 83 set_notify_enter_exit_on_child(true);
77 } 84 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 label->SetAutoColorReadabilityEnabled(false); 211 label->SetAutoColorReadabilityEnabled(false);
205 label->SetEnabledColor(SK_ColorWHITE); 212 label->SetEnabledColor(SK_ColorWHITE);
206 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); 213 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
207 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0), 214 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0),
208 SkColorSetARGB(64, 0, 0, 0)); 215 SkColorSetARGB(64, 0, 0, 0));
209 label->SetShadowOffset(0, 1); 216 label->SetShadowOffset(0, 1);
210 } 217 }
211 218
212 } // namespace internal 219 } // namespace internal
213 } // namespace ash 220 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698