| Index: ui/views/style/platform_style_mac.mm
|
| diff --git a/ui/views/style/platform_style_mac.mm b/ui/views/style/platform_style_mac.mm
|
| index cbe9be51ce15d0094f4546ee536b1cf0bf603def..b2170ca1d5b451e4077ce4c58d8a70786db10c00 100644
|
| --- a/ui/views/style/platform_style_mac.mm
|
| +++ b/ui/views/style/platform_style_mac.mm
|
| @@ -17,6 +17,10 @@
|
|
|
| namespace views {
|
|
|
| +const int PlatformStyle::kMinLabelButtonWidth = 32;
|
| +const int PlatformStyle::kMinLabelButtonHeight = 30;
|
| +const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = false;
|
| +
|
| // static
|
| gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled,
|
| Combobox::Style style) {
|
| @@ -56,4 +60,28 @@ scoped_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
|
| return make_scoped_ptr(new CocoaScrollBar(is_horizontal));
|
| }
|
|
|
| +// static
|
| +SkColor PlatformStyle::TextColorForButton(
|
| + const ButtonColorByState& color_by_state,
|
| + const LabelButton& button) {
|
| + Button::ButtonState state = button.state();
|
| + if (button.style() == Button::STYLE_BUTTON &&
|
| + DialogButtonBorderMac::ShouldRenderDefault(button)) {
|
| + // For convenience, we currently assume Mac wants the color corresponding to
|
| + // the pressed state for default buttons.
|
| + state = Button::STATE_PRESSED;
|
| + }
|
| + return color_by_state[state];
|
| +}
|
| +
|
| +// static
|
| +void PlatformStyle::ApplyLabelButtonTextStyle(
|
| + views::Label* label,
|
| + ButtonColorByState* color_by_state) {
|
| + const ui::NativeTheme* theme = label->GetNativeTheme();
|
| + ButtonColorByState& colors = *color_by_state;
|
| + colors[Button::STATE_PRESSED] =
|
| + theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor);
|
| +}
|
| +
|
| } // namespace views
|
|
|