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

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

Issue 15061006: views: Switch Checkbox over to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: set the image for STATE_TOGGLED Created 7 years, 7 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/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 89ae8c351142345a5dce0cca5adea8244b4b3b7f..ad36eb0b5a0af86d48fd3838b3c14dbbe11a7cce 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -296,11 +296,12 @@ gfx::Rect LabelButton::GetThemePaintRect() const {
ui::NativeTheme::State LabelButton::GetThemeState(
ui::NativeTheme::ExtraParams* params) const {
GetExtraParams(params);
- switch(state()) {
+ switch (state()) {
case STATE_NORMAL: return ui::NativeTheme::kNormal;
case STATE_HOVERED: return ui::NativeTheme::kHovered;
case STATE_PRESSED: return ui::NativeTheme::kPressed;
case STATE_DISABLED: return ui::NativeTheme::kDisabled;
+ case STATE_TOGGLED: return ui::NativeTheme::kToggled;
msw 2013/05/16 22:40:05 nit: I'd prefer this to come before STATE_DISABLED
tfarina 2013/05/18 00:54:08 ditto.
case STATE_COUNT: NOTREACHED() << "Unknown state: " << state();
}
return ui::NativeTheme::kNormal;

Powered by Google App Engine
This is Rietveld 408576698