| 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 "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
| 9 #include "ui/gfx/paint_vector_icon.h" | 9 #include "ui/gfx/paint_vector_icon.h" |
| 10 #include "ui/gfx/vector_icons.h" | 10 #include "ui/gfx/vector_icons.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 kComboboxArrowWidth, | 37 kComboboxArrowWidth, |
| 38 is_enabled ? SK_ColorWHITE : SK_ColorBLACK); | 38 is_enabled ? SK_ColorWHITE : SK_ColorBLACK); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // static | 41 // static |
| 42 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { | 42 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { |
| 43 return base::WrapUnique(new FocusableRoundedBorder); | 43 return base::WrapUnique(new FocusableRoundedBorder); |
| 44 } | 44 } |
| 45 | 45 |
| 46 // static | 46 // static |
| 47 std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground() { | 47 std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground( |
| 48 return base::WrapUnique(new ComboboxBackgroundMac); | 48 int shoulder_width) { |
| 49 return base::WrapUnique(new ComboboxBackgroundMac(shoulder_width)); |
| 49 } | 50 } |
| 50 | 51 |
| 51 // static | 52 // static |
| 52 std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder( | 53 std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder( |
| 53 Button::ButtonStyle style) { | 54 Button::ButtonStyle style) { |
| 54 if (style == Button::STYLE_BUTTON) | 55 if (style == Button::STYLE_BUTTON) |
| 55 return base::WrapUnique(new DialogButtonBorderMac()); | 56 return base::WrapUnique(new DialogButtonBorderMac()); |
| 56 | 57 |
| 57 return base::WrapUnique(new LabelButtonAssetBorder(style)); | 58 return base::WrapUnique(new LabelButtonAssetBorder(style)); |
| 58 } | 59 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 80 void PlatformStyle::ApplyLabelButtonTextStyle( | 81 void PlatformStyle::ApplyLabelButtonTextStyle( |
| 81 views::Label* label, | 82 views::Label* label, |
| 82 ButtonColorByState* color_by_state) { | 83 ButtonColorByState* color_by_state) { |
| 83 const ui::NativeTheme* theme = label->GetNativeTheme(); | 84 const ui::NativeTheme* theme = label->GetNativeTheme(); |
| 84 ButtonColorByState& colors = *color_by_state; | 85 ButtonColorByState& colors = *color_by_state; |
| 85 colors[Button::STATE_PRESSED] = | 86 colors[Button::STATE_PRESSED] = |
| 86 theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor); | 87 theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor); |
| 87 } | 88 } |
| 88 | 89 |
| 89 } // namespace views | 90 } // namespace views |
| OLD | NEW |