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

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

Issue 2270933002: Harmony: disable ripples on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call superclass in StateChanged Created 4 years, 3 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 25 matching lines...) Expand all
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::kDialogDefaultButtonCanBeCancel = true; 41 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = true;
42 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = false; 42 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = false;
43 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction = 43 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction =
44 CustomButton::NOTIFY_ON_RELEASE; 44 CustomButton::NOTIFY_ON_RELEASE;
45 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false; 45 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false;
46 const bool PlatformStyle::kUseRipples = true;
46 47
47 // static 48 // static
48 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, 49 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled,
49 Combobox::Style style) { 50 Combobox::Style style) {
50 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 51 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
51 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW); 52 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW);
52 } 53 }
53 54
54 // static 55 // static
55 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { 56 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() {
(...skipping 25 matching lines...) Expand all
81 return base::MakeUnique<NativeScrollBar>(is_horizontal); 82 return base::MakeUnique<NativeScrollBar>(is_horizontal);
82 } 83 }
83 84
84 // static 85 // static
85 SkColor PlatformStyle::TextColorForButton( 86 SkColor PlatformStyle::TextColorForButton(
86 const ButtonColorByState& color_by_state, 87 const ButtonColorByState& color_by_state,
87 const LabelButton& button) { 88 const LabelButton& button) {
88 return color_by_state[button.state()]; 89 return color_by_state[button.state()];
89 } 90 }
90 91
92 SkColor PlatformStyle::BackgroundColorForMdButton(
93 SkColor color,
94 Button::ButtonState state) {
95 return color;
96 }
97
91 #endif // OS_MACOSX 98 #endif // OS_MACOSX
92 99
93 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX) 100 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX)
94 // static 101 // static
95 void PlatformStyle::ApplyLabelButtonTextStyle( 102 void PlatformStyle::ApplyLabelButtonTextStyle(
96 Label* label, 103 Label* label,
97 ButtonColorByState* color_by_state) { 104 ButtonColorByState* color_by_state) {
98 ButtonColorByState& colors = *color_by_state; 105 ButtonColorByState& colors = *color_by_state;
99 colors[Button::STATE_NORMAL] = kStyleButtonTextColor; 106 colors[Button::STATE_NORMAL] = kStyleButtonTextColor;
100 colors[Button::STATE_HOVERED] = kStyleButtonTextColor; 107 colors[Button::STATE_HOVERED] = kStyleButtonTextColor;
(...skipping 10 matching lines...) Expand all
111 118
112 #if !defined(DESKTOP_LINUX) 119 #if !defined(DESKTOP_LINUX)
113 // static 120 // static
114 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( 121 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
115 LabelButton* button) { 122 LabelButton* button) {
116 return button->CreateDefaultBorder(); 123 return button->CreateDefaultBorder();
117 } 124 }
118 #endif 125 #endif
119 126
120 } // namespace views 127 } // 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