OLD | NEW |
---|---|
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "views/controls/label.h" | 5 #include "views/controls/label.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "app/gfx/canvas.h" | 9 #include "app/gfx/canvas.h" |
10 #include "app/gfx/font.h" | 10 #include "app/gfx/font.h" |
11 #include "app/gfx/insets.h" | 11 #include "app/gfx/insets.h" |
12 #include "app/gfx/text_elider.h" | 12 #include "app/gfx/text_elider.h" |
13 #include "app/l10n_util.h" | 13 #include "app/l10n_util.h" |
14 #include "app/resource_bundle.h" | 14 #include "app/resource_bundle.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "views/background.h" | 17 #include "views/background.h" |
18 | 18 |
19 namespace views { | 19 namespace views { |
20 | 20 |
21 // static | |
sky
2009/09/25 00:03:51
nit: no need to indent this.
| |
21 const char Label::kViewClassName[] = "views/Label"; | 22 const char Label::kViewClassName[] = "views/Label"; |
22 | 23 |
23 static const SkColor kEnabledColor = SK_ColorBLACK; | 24 static const SkColor kEnabledColor = SK_ColorBLACK; |
24 static const SkColor kDisabledColor = SkColorSetRGB(161, 161, 146); | 25 static const SkColor kDisabledColor = SkColorSetRGB(161, 161, 146); |
25 static const int kFocusBorderPadding = 1; | 26 static const int kFocusBorderPadding = 1; |
26 | 27 |
27 Label::Label() { | 28 Label::Label() { |
28 Init(L"", GetDefaultFont()); | 29 Init(L"", GetDefaultFont()); |
29 } | 30 } |
30 | 31 |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
465 } | 466 } |
466 | 467 |
467 bool Label::GetAccessibleState(AccessibilityTypes::State* state) { | 468 bool Label::GetAccessibleState(AccessibilityTypes::State* state) { |
468 DCHECK(state); | 469 DCHECK(state); |
469 | 470 |
470 *state = AccessibilityTypes::STATE_READONLY; | 471 *state = AccessibilityTypes::STATE_READONLY; |
471 return true; | 472 return true; |
472 } | 473 } |
473 | 474 |
474 } // namespace views | 475 } // namespace views |
OLD | NEW |