OLD | NEW |
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 #include "ui/views/painter.h" | 11 #include "ui/views/painter.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener, | 16 TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener, |
17 const base::string16& text) | 17 const base::string16& text) |
18 : views::LabelButton(listener, text) { | 18 : views::LabelButton(listener, text) { |
19 set_border(new TrayPopupLabelButtonBorder); | 19 set_border(new TrayPopupLabelButtonBorder); |
20 set_focusable(true); | 20 SetFocusable(true); |
21 set_request_focus_on_press(false); | 21 set_request_focus_on_press(false); |
22 set_animate_on_state_change(false); | 22 set_animate_on_state_change(false); |
23 SetHorizontalAlignment(gfx::ALIGN_CENTER); | 23 SetHorizontalAlignment(gfx::ALIGN_CENTER); |
24 SetFocusPainter(views::Painter::CreateSolidFocusPainter( | 24 SetFocusPainter(views::Painter::CreateSolidFocusPainter( |
25 kFocusBorderColor, | 25 kFocusBorderColor, |
26 gfx::Insets(1, 1, 2, 2))); | 26 gfx::Insets(1, 1, 2, 2))); |
27 } | 27 } |
28 | 28 |
29 TrayPopupLabelButton::~TrayPopupLabelButton() {} | 29 TrayPopupLabelButton::~TrayPopupLabelButton() {} |
30 | 30 |
31 } // namespace internal | 31 } // namespace internal |
32 } // namespace ash | 32 } // namespace ash |
OLD | NEW |