OLD | NEW |
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 "chrome/browser/chromeos/status/status_area_button.h" | 5 #include "chrome/browser/chromeos/status/status_area_button.h" |
6 | 6 |
7 #include "grit/theme_resources.h" | 7 #include "grit/theme_resources.h" |
8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
10 #include "ui/gfx/skbitmap_operations.h" | 10 #include "ui/gfx/skbitmap_operations.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // Pad for status icons. | 27 // Pad for status icons. |
28 const int kIconHorizontalPad = 2; | 28 const int kIconHorizontalPad = 2; |
29 | 29 |
30 } | 30 } |
31 | 31 |
32 //////////////////////////////////////////////////////////////////////////////// | 32 //////////////////////////////////////////////////////////////////////////////// |
33 // StatusAreaButton | 33 // StatusAreaButton |
34 | 34 |
35 StatusAreaButton::StatusAreaButton(Delegate* button_delegate, | 35 StatusAreaButton::StatusAreaButton(Delegate* button_delegate, |
36 views::MenuButtonDelegate* menu_delegate) | 36 views::MenuButtonListener* listener) |
37 : MenuButton(NULL, string16(), menu_delegate, false), | 37 : MenuButton(NULL, string16(), listener, false), |
38 menu_active_(true), | 38 menu_active_(true), |
39 delegate_(button_delegate) { | 39 delegate_(button_delegate) { |
40 set_border(NULL); | 40 set_border(NULL); |
41 | 41 |
42 light_font_ = | 42 light_font_ = |
43 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont). | 43 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont). |
44 DeriveFont(kFontSizeDelta); | 44 DeriveFont(kFontSizeDelta); |
45 bold_font_ = light_font_.DeriveFont(0, gfx::Font::BOLD); | 45 bold_font_ = light_font_.DeriveFont(0, gfx::Font::BOLD); |
46 | 46 |
47 SetShowMultipleIconStates(false); | 47 SetShowMultipleIconStates(false); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 return 24; | 162 return 24; |
163 } | 163 } |
164 | 164 |
165 int StatusAreaButton::icon_width() { | 165 int StatusAreaButton::icon_width() { |
166 return 23; | 166 return 23; |
167 } | 167 } |
168 | 168 |
169 int StatusAreaButton::horizontal_padding() { | 169 int StatusAreaButton::horizontal_padding() { |
170 return 1; | 170 return 1; |
171 } | 171 } |
OLD | NEW |