Commit 9071d74e authored by Roman Aleksandrov's avatar Roman Aleksandrov Committed by Commit Bot

LoginPinViewButton: Hide the ripple if the button disable.

Animate the ripple to deactivated state if the backspace button becomes
disabled. This speeds up the fading away of the ripple.

Bug: 1021834
Change-Id: I1285a4644a81e62b2b5bf371574bb1eccd350e21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036059Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Roman Aleksandrov <raleksandrov@google.com>
Cr-Commit-Position: refs/heads/master@{#738224}
parent 9553e1df
......@@ -28,6 +28,7 @@
#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/ink_drop_mask.h"
#include "ui/views/animation/ink_drop_state.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h"
......@@ -275,6 +276,7 @@ class LoginPinView::BackspacePinButton : public BasePinButton {
void OnEnabledChanged() {
SkColor color = login_constants::kButtonEnabledColor;
if (!GetEnabled()) {
AnimateInkDrop(views::InkDropState::DEACTIVATED, nullptr);
color = SkColorSetA(color, login_constants::kButtonDisabledAlpha);
CancelRepeat();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment