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

Unified Diff: ui/views/controls/button/image_button.h

Issue 2753833003: Create utility function for configuring an ImageButton to use a vector (Closed)
Patch Set: . Created 3 years, 9 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/controls/button/image_button.h
diff --git a/ui/views/controls/button/image_button.h b/ui/views/controls/button/image_button.h
index eba2a835a40eff5f07a628558b2fe1fd5ad48b16..1c640aae946334e42e20dd0bfcf4c9f583922f4e 100644
--- a/ui/views/controls/button/image_button.h
+++ b/ui/views/controls/button/image_button.h
@@ -13,6 +13,10 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/views/controls/button/custom_button.h"
+namespace gfx {
+struct VectorIcon;
+}
+
namespace views {
class Painter;
@@ -170,6 +174,12 @@ class VIEWS_EXPORT ToggleImageButton : public ImageButton {
DISALLOW_COPY_AND_ASSIGN(ToggleImageButton);
};
+// Sets up |button| as a button that displays an ink drop and a vector icon.
+// TODO(estade): find the right place for this utility.
+void VIEWS_EXPORT SetImageFromVectorIcon(ImageButton* button,
+ const gfx::VectorIcon& icon,
+ SkColor base_color);
+
} // namespace views
#endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_

Powered by Google App Engine
This is Rietveld 408576698