| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 | 70 |
| 71 // static | 71 // static |
| 72 SkColor PlatformStyle::TextColorForButton( | 72 SkColor PlatformStyle::TextColorForButton( |
| 73 const ButtonColorByState& color_by_state, | 73 const ButtonColorByState& color_by_state, |
| 74 const LabelButton& button) { | 74 const LabelButton& button) { |
| 75 return color_by_state[button.state()]; | 75 return color_by_state[button.state()]; |
| 76 } | 76 } |
| 77 | 77 |
| 78 // static | 78 // static |
| 79 void PlatformStyle::OnTextfieldKeypressUnhandled() {} | 79 void PlatformStyle::OnTextfieldEditFailed() {} |
| 80 | 80 |
| 81 #endif // OS_MACOSX | 81 #endif // OS_MACOSX |
| 82 | 82 |
| 83 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX) | 83 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX) |
| 84 // static | 84 // static |
| 85 void PlatformStyle::ApplyLabelButtonTextStyle( | 85 void PlatformStyle::ApplyLabelButtonTextStyle( |
| 86 Label* label, | 86 Label* label, |
| 87 ButtonColorByState* color_by_state) { | 87 ButtonColorByState* color_by_state) { |
| 88 ButtonColorByState& colors = *color_by_state; | 88 ButtonColorByState& colors = *color_by_state; |
| 89 colors[Button::STATE_NORMAL] = kStyleButtonTextColor; | 89 colors[Button::STATE_NORMAL] = kStyleButtonTextColor; |
| 90 colors[Button::STATE_HOVERED] = kStyleButtonTextColor; | 90 colors[Button::STATE_HOVERED] = kStyleButtonTextColor; |
| 91 colors[Button::STATE_PRESSED] = kStyleButtonTextColor; | 91 colors[Button::STATE_PRESSED] = kStyleButtonTextColor; |
| 92 | 92 |
| 93 label->SetShadows(gfx::ShadowValues( | 93 label->SetShadows(gfx::ShadowValues( |
| 94 1, gfx::ShadowValue(gfx::Vector2d(0, 1), 0, kStyleButtonShadowColor))); | 94 1, gfx::ShadowValue(gfx::Vector2d(0, 1), 0, kStyleButtonShadowColor))); |
| 95 } | 95 } |
| 96 #endif | 96 #endif |
| 97 | 97 |
| 98 #if !defined(DESKTOP_LINUX) | 98 #if !defined(DESKTOP_LINUX) |
| 99 // static | 99 // static |
| 100 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( | 100 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( |
| 101 LabelButton* button) { | 101 LabelButton* button) { |
| 102 return button->CreateDefaultBorder(); | 102 return button->CreateDefaultBorder(); |
| 103 } | 103 } |
| 104 #endif | 104 #endif |
| 105 | 105 |
| 106 } // namespace views | 106 } // namespace views |
| OLD | NEW |