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

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: fixes :) 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..1875ced3253132a54d459017cd6074fd1e9ff129 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 part containing the arrow, *including* any padding around the arrow
+ // or background on the arrow, is called the "shoulder" of the combobox or
+ // menubutton. On Mac, the shoulder has a background, so the text part must
+ // not encroach into it.
+ static int GetComboboxShoulderWidth(Combobox::Style style);
+ static int GetMenuButtonShoulderWidth();
+
// 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