| 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 #include "ui/views/style/platform_style.h" | 5 #include "ui/views/style/platform_style.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "ui/base/material_design/material_design_controller.h" | 9 #include "ui/base/material_design/material_design_controller.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return base::MakeUnique<NativeScrollBar>(is_horizontal); | 82 return base::MakeUnique<NativeScrollBar>(is_horizontal); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // static | 85 // static |
| 86 SkColor PlatformStyle::TextColorForButton( | 86 SkColor PlatformStyle::TextColorForButton( |
| 87 const ButtonColorByState& color_by_state, | 87 const ButtonColorByState& color_by_state, |
| 88 const LabelButton& button) { | 88 const LabelButton& button) { |
| 89 return color_by_state[button.state()]; | 89 return color_by_state[button.state()]; |
| 90 } | 90 } |
| 91 | 91 |
| 92 SkColor PlatformStyle::BackgroundColorForMdButton( | |
| 93 SkColor color, | |
| 94 Button::ButtonState state) { | |
| 95 return color; | |
| 96 } | |
| 97 | |
| 98 #endif // OS_MACOSX | 92 #endif // OS_MACOSX |
| 99 | 93 |
| 100 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX) | 94 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX) |
| 101 // static | 95 // static |
| 102 void PlatformStyle::ApplyLabelButtonTextStyle( | 96 void PlatformStyle::ApplyLabelButtonTextStyle( |
| 103 Label* label, | 97 Label* label, |
| 104 ButtonColorByState* color_by_state) { | 98 ButtonColorByState* color_by_state) { |
| 105 ButtonColorByState& colors = *color_by_state; | 99 ButtonColorByState& colors = *color_by_state; |
| 106 colors[Button::STATE_NORMAL] = kStyleButtonTextColor; | 100 colors[Button::STATE_NORMAL] = kStyleButtonTextColor; |
| 107 colors[Button::STATE_HOVERED] = kStyleButtonTextColor; | 101 colors[Button::STATE_HOVERED] = kStyleButtonTextColor; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 118 | 112 |
| 119 #if !defined(DESKTOP_LINUX) | 113 #if !defined(DESKTOP_LINUX) |
| 120 // static | 114 // static |
| 121 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( | 115 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( |
| 122 LabelButton* button) { | 116 LabelButton* button) { |
| 123 return button->CreateDefaultBorder(); | 117 return button->CreateDefaultBorder(); |
| 124 } | 118 } |
| 125 #endif | 119 #endif |
| 126 | 120 |
| 127 } // namespace views | 121 } // namespace views |
| OLD | NEW |