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 "ui/views/controls/button/text_button.h" | 5 #include "ui/views/controls/button/text_button.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const int kMinHeightDLUs = 14; | 54 const int kMinHeightDLUs = 14; |
55 #endif | 55 #endif |
56 | 56 |
57 // The default hot and pushed button image IDs; normal has none by default. | 57 // The default hot and pushed button image IDs; normal has none by default. |
58 const int kHotImages[] = IMAGE_GRID(IDR_TEXTBUTTON_HOVER); | 58 const int kHotImages[] = IMAGE_GRID(IDR_TEXTBUTTON_HOVER); |
59 const int kPushedImages[] = IMAGE_GRID(IDR_TEXTBUTTON_PRESSED); | 59 const int kPushedImages[] = IMAGE_GRID(IDR_TEXTBUTTON_PRESSED); |
60 | 60 |
61 } // namespace | 61 } // namespace |
62 | 62 |
63 // static | 63 // static |
64 const char TextButtonBase::kViewClassName[] = "views/TextButtonBase"; | 64 const char TextButtonBase::kViewClassName[] = "TextButtonBase"; |
65 // static | 65 // static |
66 const char TextButton::kViewClassName[] = "views/TextButton"; | 66 const char TextButton::kViewClassName[] = "TextButton"; |
67 | 67 |
68 //////////////////////////////////////////////////////////////////////////////// | 68 //////////////////////////////////////////////////////////////////////////////// |
69 // | 69 // |
70 // TextButtonBorder | 70 // TextButtonBorder |
71 // | 71 // |
72 //////////////////////////////////////////////////////////////////////////////// | 72 //////////////////////////////////////////////////////////////////////////////// |
73 | 73 |
74 TextButtonBorder::TextButtonBorder() { | 74 TextButtonBorder::TextButtonBorder() { |
75 } | 75 } |
76 | 76 |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 if (show_multiple_icon_states_) { | 729 if (show_multiple_icon_states_) { |
730 if (has_hover_icon_ && (state() == STATE_HOVERED)) | 730 if (has_hover_icon_ && (state() == STATE_HOVERED)) |
731 return icon_hover_; | 731 return icon_hover_; |
732 if (has_pushed_icon_ && (state() == STATE_PRESSED)) | 732 if (has_pushed_icon_ && (state() == STATE_PRESSED)) |
733 return icon_pushed_; | 733 return icon_pushed_; |
734 } | 734 } |
735 return icon_; | 735 return icon_; |
736 } | 736 } |
737 | 737 |
738 } // namespace views | 738 } // namespace views |
OLD | NEW |