| 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 "ui/base/resource/resource_bundle.h" | 7 #include "ui/base/resource/resource_bundle.h" |
| 8 #include "ui/gfx/paint_vector_icon.h" | 8 #include "ui/gfx/paint_vector_icon.h" |
| 9 #include "ui/gfx/vector_icons.h" | 9 #include "ui/gfx/vector_icons.h" |
| 10 #include "ui/resources/grit/ui_resources.h" | 10 #include "ui/resources/grit/ui_resources.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 30 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 31 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW); | 31 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW); |
| 32 } | 32 } |
| 33 const int kComboboxArrowWidth = 13; | 33 const int kComboboxArrowWidth = 13; |
| 34 return gfx::CreateVectorIcon(gfx::VectorIconId::COMBOBOX_ARROW_MAC, | 34 return gfx::CreateVectorIcon(gfx::VectorIconId::COMBOBOX_ARROW_MAC, |
| 35 kComboboxArrowWidth, | 35 kComboboxArrowWidth, |
| 36 is_enabled ? SK_ColorWHITE : SK_ColorBLACK); | 36 is_enabled ? SK_ColorWHITE : SK_ColorBLACK); |
| 37 } | 37 } |
| 38 | 38 |
| 39 // static | 39 // static |
| 40 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = true; |
| 41 |
| 42 // static |
| 40 scoped_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { | 43 scoped_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { |
| 41 return make_scoped_ptr(new FocusableRoundedBorder); | 44 return make_scoped_ptr(new FocusableRoundedBorder); |
| 42 } | 45 } |
| 43 | 46 |
| 44 // static | 47 // static |
| 45 scoped_ptr<Background> PlatformStyle::CreateComboboxBackground() { | 48 scoped_ptr<Background> PlatformStyle::CreateComboboxBackground() { |
| 46 return make_scoped_ptr(new ComboboxBackgroundMac); | 49 return make_scoped_ptr(new ComboboxBackgroundMac); |
| 47 } | 50 } |
| 48 | 51 |
| 49 // static | 52 // static |
| (...skipping 28 matching lines...) Expand all Loading... |
| 78 void PlatformStyle::ApplyLabelButtonTextStyle( | 81 void PlatformStyle::ApplyLabelButtonTextStyle( |
| 79 views::Label* label, | 82 views::Label* label, |
| 80 ButtonColorByState* color_by_state) { | 83 ButtonColorByState* color_by_state) { |
| 81 const ui::NativeTheme* theme = label->GetNativeTheme(); | 84 const ui::NativeTheme* theme = label->GetNativeTheme(); |
| 82 ButtonColorByState& colors = *color_by_state; | 85 ButtonColorByState& colors = *color_by_state; |
| 83 colors[Button::STATE_PRESSED] = | 86 colors[Button::STATE_PRESSED] = |
| 84 theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor); | 87 theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor); |
| 85 } | 88 } |
| 86 | 89 |
| 87 } // namespace views | 90 } // namespace views |
| OLD | NEW |