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

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

Issue 2389453002: Remove IsModeMaterial checks in ui/views/ (Closed)
Patch Set: oops Created 4 years, 3 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/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 2d78b6b17ad08d100fde4bb99a469d6a1b0fb5ed..5bcd0c907fc2107e111dbfafed4adb36e43843ef 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -5,7 +5,6 @@
#include "ui/views/controls/button/custom_button.h"
#include "ui/accessibility/ax_view_state.h"
-#include "ui/base/material_design/material_design_controller.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/keyboard_codes.h"
@@ -203,11 +202,9 @@ void CustomButton::OnMouseReleased(const ui::MouseEvent& event) {
void CustomButton::OnMouseCaptureLost() {
// Starting a drag results in a MouseCaptureLost. Reset button state.
- // TODO(varkha) While in drag only reset the state with Material Design.
- // The same logic may applies everywhere so gather any feedback and update.
- bool reset_button_state =
- !InDrag() || ui::MaterialDesignController::IsModeMaterial();
- if (state_ != STATE_DISABLED && reset_button_state)
+ // TODO(varkha): Reset the state even while in drag. The same logic may
+ // applies everywhere so gather any feedback and update.
+ if (state_ != STATE_DISABLED)
SetState(STATE_NORMAL);
AnimateInkDrop(views::InkDropState::HIDDEN, nullptr /* event */);
}

Powered by Google App Engine
This is Rietveld 408576698