OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 5 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Returns the current text color for the current button state. | 81 // Returns the current text color for the current button state. |
82 static SkColor TextColorForButton(const ButtonColorByState& color_by_state, | 82 static SkColor TextColorForButton(const ButtonColorByState& color_by_state, |
83 const LabelButton& button); | 83 const LabelButton& button); |
84 | 84 |
85 // Applies platform styles to |label| and fills |color_by_state| with the text | 85 // Applies platform styles to |label| and fills |color_by_state| with the text |
86 // colors for normal, pressed, hovered, and disabled states, if the colors for | 86 // colors for normal, pressed, hovered, and disabled states, if the colors for |
87 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme. | 87 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme. |
88 static void ApplyLabelButtonTextStyle(Label* label, | 88 static void ApplyLabelButtonTextStyle(Label* label, |
89 ButtonColorByState* color_by_state); | 89 ButtonColorByState* color_by_state); |
90 | 90 |
91 // Returns the background color that should be used for an MdTextButton or | |
92 // other MD controls when in the given state. | |
93 static SkColor BackgroundColorForMdButton(SkColor color, | |
94 Button::ButtonState state); | |
95 | |
96 // Applies the current system theme to the default border created by |button|. | 91 // Applies the current system theme to the default border created by |button|. |
97 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( | 92 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( |
98 LabelButton* button); | 93 LabelButton* button); |
99 | 94 |
100 private: | 95 private: |
101 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); | 96 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); |
102 }; | 97 }; |
103 | 98 |
104 } // namespace views | 99 } // namespace views |
105 | 100 |
106 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 101 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
OLD | NEW |