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

Side by Side Diff: ui/views/controls/button/image_button_factory.h

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: check details 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 #ifndef UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_FACTORY_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_FACTORY_H_
7
8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/views/views_export.h"
10
11 namespace gfx {
12 struct VectorIcon;
13 }
14
15 namespace views {
16
17 class ButtonListener;
18 class ImageButton;
19
20 // Creates an ImageButton with an ink drop and a centered image in preparation
21 // for applying a vector icon with SetImageFromVectorIcon below.
22 VIEWS_EXPORT ImageButton* CreateVectorImageButton(ButtonListener* listener);
23
24 // Sets images on |button| for STATE_NORMAL and STATE_DISABLED from the given
25 // vector icon and color. |related_text_color| is normally the main text color
26 // used in the parent view, and the actual color used is derived from that. Call
27 // again to update the button if |related_text_color| is changing.
28 VIEWS_EXPORT void SetImageFromVectorIcon(
29 ImageButton* button,
30 const gfx::VectorIcon& icon,
31 SkColor related_text_color = SK_ColorBLACK);
32
33 } // namespace views
34
35 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/image_button.h ('k') | ui/views/controls/button/image_button_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698