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

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

Issue 2391393002: Harmony - Use FocusableBorder for comboboxes on Mac (Closed)
Patch Set: fix mac Created 4 years, 2 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/mac/combobox_background_mac.cc ('k') | ui/views/style/platform_style.cc » ('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 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ 5 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_
6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Whether ripples should be used for visual feedback on control activation. 55 // Whether ripples should be used for visual feedback on control activation.
56 static const bool kUseRipples; 56 static const bool kUseRipples;
57 57
58 // Creates an ImageSkia containing the image to use for the combobox arrow. 58 // Creates an ImageSkia containing the image to use for the combobox arrow.
59 // The |is_enabled| argument is true if the control the arrow is for is 59 // The |is_enabled| argument is true if the control the arrow is for is
60 // enabled, and false if the control is disabled. The |style| argument is the 60 // enabled, and false if the control is disabled. The |style| argument is the
61 // style of the combobox the arrow is being drawn for. 61 // style of the combobox the arrow is being drawn for.
62 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, 62 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled,
63 Combobox::Style style); 63 Combobox::Style style);
64 64
65 // Creates the appropriate border for a focusable Combobox.
66 static std::unique_ptr<FocusableBorder> CreateComboboxBorder();
67
68 // Creates the appropriate background for a Combobox.
69 static std::unique_ptr<Background> CreateComboboxBackground(
70 int shoulder_width);
71
72 // Creates the default scrollbar for the given orientation. 65 // Creates the default scrollbar for the given orientation.
73 static std::unique_ptr<ScrollBar> CreateScrollBar(bool is_horizontal); 66 static std::unique_ptr<ScrollBar> CreateScrollBar(bool is_horizontal);
74 67
75 // Returns the current text color for the current button state. 68 // Returns the current text color for the current button state.
76 static SkColor TextColorForButton(const ButtonColorByState& color_by_state, 69 static SkColor TextColorForButton(const ButtonColorByState& color_by_state,
77 const LabelButton& button); 70 const LabelButton& button);
78 71
79 // Applies platform styles to |label| and fills |color_by_state| with the text 72 // Applies platform styles to |label| and fills |color_by_state| with the text
80 // colors for normal, pressed, hovered, and disabled states, if the colors for 73 // colors for normal, pressed, hovered, and disabled states, if the colors for
81 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme. 74 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme.
82 static void ApplyLabelButtonTextStyle(Label* label, 75 static void ApplyLabelButtonTextStyle(Label* label,
83 ButtonColorByState* color_by_state); 76 ButtonColorByState* color_by_state);
84 77
85 // Applies the current system theme to the default border created by |button|. 78 // Applies the current system theme to the default border created by |button|.
86 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( 79 static std::unique_ptr<Border> CreateThemedLabelButtonBorder(
87 LabelButton* button); 80 LabelButton* button);
88 81
89 // Called whenever a textfield edit fails. Gives visual/audio feedback about 82 // Called whenever a textfield edit fails. Gives visual/audio feedback about
90 // the failed edit if platform-appropriate. 83 // the failed edit if platform-appropriate.
91 static void OnTextfieldEditFailed(); 84 static void OnTextfieldEditFailed();
92 85
93 private: 86 private:
94 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); 87 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle);
95 }; 88 };
96 89
97 } // namespace views 90 } // namespace views
98 91
99 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ 92 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_
OLDNEW
« no previous file with comments | « ui/views/style/mac/combobox_background_mac.cc ('k') | ui/views/style/platform_style.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698