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

Unified Diff: ui/views/style/platform_style.h

Issue 1904753002: MenuButton: support Mac look & feel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix RTL support Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/style/platform_style.h
diff --git a/ui/views/style/platform_style.h b/ui/views/style/platform_style.h
index e6916176bf4de6958f2518b8231de018547dd145..77677922099dfd54c74c80caee6c2881127cf2eb 100644
--- a/ui/views/style/platform_style.h
+++ b/ui/views/style/platform_style.h
@@ -52,6 +52,26 @@ class VIEWS_EXPORT PlatformStyle {
static std::unique_ptr<LabelButtonBorder> CreateLabelButtonBorder(
Button::ButtonStyle style);
+ // Creates an ImageSkia containing the image to use for the menubutton arrow.
+ static gfx::ImageSkia CreateMenuButtonArrow(bool is_enabled);
+
+ // Create the appropriate background for a MenuButton.
+ static std::unique_ptr<Background> CreateMenuButtonBackground();
+
+ // Create the appropriate border for a MenuButton.
+ static std::unique_ptr<FocusableBorder> CreateMenuButtonBorder();
+
+ // A combobox or menubutton looks like this:
+ // ------------------------------------
+ // | text field ............. | arrow |
+ // ------------------------------------
+ // These functions return the width of the arrow part. This includes the arrow
+ // image itself as well as any padding on either side of it. On Mac, this is
+ // the width that will be filled by the arrow button's background, so text
+ // must not encroach upon it.
+ static int GetComboboxArrowWidth(Combobox::Style style);
tapted 2016/04/21 06:06:46 At this point "shoulder" is really starting to gro
Elly Fong-Jones 2016/04/21 15:30:27 Done.
+ static int GetMenuButtonArrowWidth();
+
// Creates the default scrollbar for the given orientation.
static std::unique_ptr<ScrollBar> CreateScrollBar(bool is_horizontal);

Powered by Google App Engine
This is Rietveld 408576698