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

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

Issue 10694139: ash: Do not focus the buttons in the uber-tray on click. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "grit/ash_strings.h" 8 #include "grit/ash_strings.h"
9 #include "grit/ui_resources_standard.h" 9 #include "grit/ui_resources_standard.h"
10 #include "ui/base/accessibility/accessible_view_state.h" 10 #include "ui/base/accessibility/accessible_view_state.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 TrayPopupTextButton::TrayPopupTextButton(views::ButtonListener* listener, 307 TrayPopupTextButton::TrayPopupTextButton(views::ButtonListener* listener,
308 const string16& text) 308 const string16& text)
309 : views::TextButton(listener, text), 309 : views::TextButton(listener, text),
310 hover_(false), 310 hover_(false),
311 hover_bg_(views::Background::CreateSolidBackground(SkColorSetARGB( 311 hover_bg_(views::Background::CreateSolidBackground(SkColorSetARGB(
312 10, 0, 0, 0))), 312 10, 0, 0, 0))),
313 hover_border_(views::Border::CreateSolidBorder(1, kButtonStrokeColor)) { 313 hover_border_(views::Border::CreateSolidBorder(1, kButtonStrokeColor)) {
314 set_alignment(ALIGN_CENTER); 314 set_alignment(ALIGN_CENTER);
315 set_border(NULL); 315 set_border(NULL);
316 set_focusable(true); 316 set_focusable(true);
317 set_request_focus_on_press(false);
317 } 318 }
318 319
319 TrayPopupTextButton::~TrayPopupTextButton() {} 320 TrayPopupTextButton::~TrayPopupTextButton() {}
320 321
321 gfx::Size TrayPopupTextButton::GetPreferredSize() { 322 gfx::Size TrayPopupTextButton::GetPreferredSize() {
322 gfx::Size size = views::TextButton::GetPreferredSize(); 323 gfx::Size size = views::TextButton::GetPreferredSize();
323 size.Enlarge(32, 16); 324 size.Enlarge(32, 16);
324 return size; 325 return size;
325 } 326 }
326 327
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 bundle.GetImageNamed(enabled_resource_id).ToImageSkia()); 394 bundle.GetImageNamed(enabled_resource_id).ToImageSkia());
394 SetToggledImage(views::CustomButton::BS_NORMAL, 395 SetToggledImage(views::CustomButton::BS_NORMAL,
395 bundle.GetImageNamed(disabled_resource_id).ToImageSkia()); 396 bundle.GetImageNamed(disabled_resource_id).ToImageSkia());
396 SetImage(views::CustomButton::BS_HOT, 397 SetImage(views::CustomButton::BS_HOT,
397 bundle.GetImageNamed(enabled_resource_id_hover).ToImageSkia()); 398 bundle.GetImageNamed(enabled_resource_id_hover).ToImageSkia());
398 SetToggledImage(views::CustomButton::BS_HOT, 399 SetToggledImage(views::CustomButton::BS_HOT,
399 bundle.GetImageNamed(disabled_resource_id_hover).ToImageSkia()); 400 bundle.GetImageNamed(disabled_resource_id_hover).ToImageSkia());
400 SetImageAlignment(views::ImageButton::ALIGN_CENTER, 401 SetImageAlignment(views::ImageButton::ALIGN_CENTER,
401 views::ImageButton::ALIGN_MIDDLE); 402 views::ImageButton::ALIGN_MIDDLE);
402 set_focusable(true); 403 set_focusable(true);
404 set_request_focus_on_press(false);
403 } 405 }
404 406
405 TrayPopupHeaderButton::~TrayPopupHeaderButton() {} 407 TrayPopupHeaderButton::~TrayPopupHeaderButton() {}
406 408
407 gfx::Size TrayPopupHeaderButton::GetPreferredSize() { 409 gfx::Size TrayPopupHeaderButton::GetPreferredSize() {
408 return gfx::Size(ash::kTrayPopupItemHeight, ash::kTrayPopupItemHeight); 410 return gfx::Size(ash::kTrayPopupItemHeight, ash::kTrayPopupItemHeight);
409 } 411 }
410 412
411 void TrayPopupHeaderButton::OnPaintBorder(gfx::Canvas* canvas) { 413 void TrayPopupHeaderButton::OnPaintBorder(gfx::Canvas* canvas) {
412 // Just the left border. 414 // Just the left border.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 label->SetAutoColorReadabilityEnabled(false); 519 label->SetAutoColorReadabilityEnabled(false);
518 label->SetEnabledColor(SK_ColorWHITE); 520 label->SetEnabledColor(SK_ColorWHITE);
519 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); 521 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
520 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0), 522 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0),
521 SkColorSetARGB(64, 0, 0, 0)); 523 SkColorSetARGB(64, 0, 0, 0));
522 label->SetShadowOffset(0, 1); 524 label->SetShadowOffset(0, 1);
523 } 525 }
524 526
525 } // namespace internal 527 } // namespace internal
526 } // namespace ash 528 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698