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

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

Issue 2620453005: Material Design: Fix MdLabelButton not updating text colors on theme changes (Closed)
Patch Set: const & Created 3 years, 11 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
« no previous file with comments | « no previous file | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.h
diff --git a/ui/views/controls/button/label_button.h b/ui/views/controls/button/label_button.h
index 6228ab2b26d2c66aa1379a730c9e972aedcf452d..c9ec241b4121392748cf7b8a6aff860710d5a536 100644
--- a/ui/views/controls/button/label_button.h
+++ b/ui/views/controls/button/label_button.h
@@ -5,6 +5,7 @@
#ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
#define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
+#include <array>
#include <memory>
#include "base/compiler_specific.h"
@@ -150,6 +151,13 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// NativeThemeDelegate:
gfx::Rect GetThemePaintRect() const override;
+ const std::array<bool, STATE_COUNT>& explicitly_set_colors() const {
+ return explicitly_set_colors_;
+ }
+ void set_explicitly_set_colors(const std::array<bool, STATE_COUNT>& colors) {
+ explicitly_set_colors_ = colors;
+ }
+
private:
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init);
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Label);
@@ -204,7 +212,7 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
SkColor button_state_colors_[STATE_COUNT];
// Used to track whether SetTextColor() has been invoked.
- bool explicitly_set_colors_[STATE_COUNT];
+ std::array<bool, STATE_COUNT> explicitly_set_colors_;
// |min_size_| increases monotonically with the preferred size.
mutable gfx::Size min_size_;
« no previous file with comments | « no previous file | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698