Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: ui/views/style/platform_style.cc

Issue 2826313006: views: remove PlatformStyle combobox hooks (Closed)
Patch Set: remove BUILD lines for deleted icons Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/style/platform_style.h ('k') | ui/views/style/platform_style_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX) 29 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX)
30 // Default text and shadow colors for STYLE_BUTTON. 30 // Default text and shadow colors for STYLE_BUTTON.
31 const SkColor kStyleButtonTextColor = SK_ColorBLACK; 31 const SkColor kStyleButtonTextColor = SK_ColorBLACK;
32 const SkColor kStyleButtonShadowColor = SK_ColorWHITE; 32 const SkColor kStyleButtonShadowColor = SK_ColorWHITE;
33 #endif 33 #endif
34 34
35 } // namespace 35 } // namespace
36 36
37 #if !defined(OS_MACOSX) 37 #if !defined(OS_MACOSX)
38 38
39 const int PlatformStyle::kComboboxNormalArrowPadding = 7;
40 const int PlatformStyle::kMinLabelButtonWidth = 70; 39 const int PlatformStyle::kMinLabelButtonWidth = 70;
41 const int PlatformStyle::kMinLabelButtonHeight = 33; 40 const int PlatformStyle::kMinLabelButtonHeight = 33;
42 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = true; 41 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = true;
43 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = true; 42 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = true;
44 const bool PlatformStyle::kSelectWordOnRightClick = false; 43 const bool PlatformStyle::kSelectWordOnRightClick = false;
45 const bool PlatformStyle::kSelectAllOnRightClickWhenUnfocused = false; 44 const bool PlatformStyle::kSelectAllOnRightClickWhenUnfocused = false;
46 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction = 45 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction =
47 CustomButton::NOTIFY_ON_RELEASE; 46 CustomButton::NOTIFY_ON_RELEASE;
48 const CustomButton::KeyClickAction PlatformStyle::kKeyClickActionOnSpace = 47 const CustomButton::KeyClickAction PlatformStyle::kKeyClickActionOnSpace =
49 CustomButton::CLICK_ON_KEY_RELEASE; 48 CustomButton::CLICK_ON_KEY_RELEASE;
50 const bool PlatformStyle::kReturnClicksFocusedControl = true; 49 const bool PlatformStyle::kReturnClicksFocusedControl = true;
51 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false; 50 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false;
52 const bool PlatformStyle::kTreeViewUsesOpenIcon = true; 51 const bool PlatformStyle::kTreeViewUsesOpenIcon = true;
53 const bool PlatformStyle::kUseRipples = true; 52 const bool PlatformStyle::kUseRipples = true;
54 const bool PlatformStyle::kMirrorBubbleArrowInRTLByDefault = true; 53 const bool PlatformStyle::kMirrorBubbleArrowInRTLByDefault = true;
55 54
56 // static 55 // static
57 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled,
58 Combobox::Style style) {
59 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
60 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW);
61 }
62
63 // static
64 std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) { 56 std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
65 #if defined(OS_CHROMEOS) 57 #if defined(OS_CHROMEOS)
66 return base::MakeUnique<OverlayScrollBar>(is_horizontal); 58 return base::MakeUnique<OverlayScrollBar>(is_horizontal);
67 #else 59 #else
68 return base::MakeUnique<ScrollBarViews>(is_horizontal); 60 return base::MakeUnique<ScrollBarViews>(is_horizontal);
69 #endif 61 #endif
70 } 62 }
71 63
72 // static 64 // static
73 SkColor PlatformStyle::TextColorForButton( 65 SkColor PlatformStyle::TextColorForButton(
(...skipping 24 matching lines...) Expand all
98 90
99 #if !defined(DESKTOP_LINUX) 91 #if !defined(DESKTOP_LINUX)
100 // static 92 // static
101 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( 93 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
102 LabelButton* button) { 94 LabelButton* button) {
103 return button->CreateDefaultBorder(); 95 return button->CreateDefaultBorder();
104 } 96 }
105 #endif 97 #endif
106 98
107 } // namespace views 99 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/style/platform_style.h ('k') | ui/views/style/platform_style_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698