Chromium Code Reviews| Index: ui/views/controls/button/menu_button.h |
| diff --git a/ui/views/controls/button/menu_button.h b/ui/views/controls/button/menu_button.h |
| index 696a94146f3f9868e01e2eca55a00dfab53f5e8e..2883149f185e7d051fd726ab1eb40421685a2863 100644 |
| --- a/ui/views/controls/button/menu_button.h |
| +++ b/ui/views/controls/button/menu_button.h |
| @@ -53,12 +53,6 @@ class VIEWS_EXPORT MenuButton : public LabelButton { |
| bool show_menu_marker); |
| ~MenuButton() override; |
| - bool show_menu_marker() const { return show_menu_marker_; } |
| - void set_menu_marker(const gfx::ImageSkia* menu_marker) { |
| - menu_marker_ = menu_marker; |
| - } |
| - const gfx::ImageSkia* menu_marker() const { return menu_marker_; } |
| - |
| const gfx::Point& menu_offset() const { return menu_offset_; } |
| void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); } |
| @@ -102,6 +96,10 @@ class VIEWS_EXPORT MenuButton : public LabelButton { |
| // Offset of the associated menu position. |
| gfx::Point menu_offset_; |
| + // Returns the width of the "shoulder" of the menubutton, which is the area |
| + // containing the menu marker, and any padding surrounding it. |
| + int GetShoulderWidth() const; |
|
tapted
2016/04/26 05:05:57
can this be made private:?
Elly Fong-Jones
2016/04/26 17:41:25
Done.
|
| + |
| private: |
| friend class PressedLock; |
| @@ -128,10 +126,7 @@ class VIEWS_EXPORT MenuButton : public LabelButton { |
| MenuButtonListener* listener_; |
| // Whether or not we're showing a drop marker. |
| - bool show_menu_marker_; |
| - |
| - // The down arrow used to differentiate the menu button from normal buttons. |
| - const gfx::ImageSkia* menu_marker_; |
| + const bool show_menu_marker_; |
| // If non-null the destructor sets this to true. This is set while the menu is |
| // showing and used to detect if the menu was deleted while running. |
| @@ -148,6 +143,10 @@ class VIEWS_EXPORT MenuButton : public LabelButton { |
| // programmatically show a menu on a disabled button. |
| bool should_disable_after_press_; |
| + // The images to draw for the menu marker, if |show_menu_marker_| is true. |
| + gfx::ImageSkia enabled_marker_image_; |
| + gfx::ImageSkia disabled_marker_image_; |
|
tapted
2016/04/26 05:05:57
Since the default PlatformStyle ignores the `enabl
Elly Fong-Jones
2016/04/26 17:41:25
Done.
|
| + |
| base::WeakPtrFactory<MenuButton> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(MenuButton); |