[gnome-shell/gbsneto/wiggle: 8/8] authPrompt: Wiggle on failure
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/wiggle: 8/8] authPrompt: Wiggle on failure
- Date: Fri, 18 Oct 2019 11:26:18 +0000 (UTC)
commit b25a73c24392c98d75d5aa17ff08d08ae60fbea7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Oct 15 21:34:35 2019 +0200
authPrompt: Wiggle on failure
Add a wiggle effect to the password entry on failure. The
parameters are set as per design review during GNOME Shell
Hackfest 2019.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/768
js/gdm/authPrompt.js | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 93a3810568..5300c4318d 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -6,6 +6,7 @@ const { Clutter, GObject, Pango, Shell, St } = imports.gi;
const Animation = imports.ui.animation;
const Batch = imports.gdm.batch;
const GdmUtil = imports.gdm.util;
+const Util = imports.misc.util;
const Params = imports.misc.params;
const ShellEntry = imports.ui.shellEntry;
const UserWidget = imports.ui.userWidget;
@@ -16,6 +17,10 @@ var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 300;
var MESSAGE_FADE_OUT_ANIMATION_TIME = 500;
+const WIGGLE_OFFSET = 6;
+const WIGGLE_DURATION = 65;
+const N_WIGGLES = 3;
+
var AuthPromptMode = {
UNLOCK_ONLY: 0,
UNLOCK_OR_LOG_IN: 1
@@ -256,6 +261,12 @@ var AuthPrompt = GObject.registerClass({
this.updateSensitivity(canRetry);
this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
+
+ Util.wiggle(this._entry, {
+ offset: WIGGLE_OFFSET,
+ duration: WIGGLE_DURATION,
+ wiggleCount: N_WIGGLES,
+ });
}
_onVerificationComplete() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]