| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 } // namespace | 33 } // namespace |
| 34 | 34 |
| 35 #if !defined(OS_MACOSX) | 35 #if !defined(OS_MACOSX) |
| 36 | 36 |
| 37 const int PlatformStyle::kComboboxNormalArrowPadding = 7; | 37 const int PlatformStyle::kComboboxNormalArrowPadding = 7; |
| 38 const int PlatformStyle::kMinLabelButtonWidth = 70; | 38 const int PlatformStyle::kMinLabelButtonWidth = 70; |
| 39 const int PlatformStyle::kMinLabelButtonHeight = 33; | 39 const int PlatformStyle::kMinLabelButtonHeight = 33; |
| 40 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = true; | 40 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = true; |
| 41 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = false; | 41 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = false; |
| 42 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction = |
| 43 CustomButton::NOTIFY_ON_RELEASE; |
| 42 | 44 |
| 43 // static | 45 // static |
| 44 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, | 46 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, |
| 45 Combobox::Style style) { | 47 Combobox::Style style) { |
| 46 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 48 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 47 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW); | 49 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW); |
| 48 } | 50 } |
| 49 | 51 |
| 50 // static | 52 // static |
| 51 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { | 53 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 109 |
| 108 #if !defined(DESKTOP_LINUX) | 110 #if !defined(DESKTOP_LINUX) |
| 109 // static | 111 // static |
| 110 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( | 112 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( |
| 111 LabelButton* button) { | 113 LabelButton* button) { |
| 112 return button->CreateDefaultBorder(); | 114 return button->CreateDefaultBorder(); |
| 113 } | 115 } |
| 114 #endif | 116 #endif |
| 115 | 117 |
| 116 } // namespace views | 118 } // namespace views |
| OLD | NEW |