animationUtils: Group together various animation helpers
The environment module is used to initialize the environment, yet it currently also defines the adjustAnimationTime() function. Ideally it should not export any utility functions, in particular once converted to ESM. The function cannot be moved to the existing Utils module, as that depends on an initialized environment, and can therefore not be imported from environment.js, so use that opportunity to group together several animation helpers in a new animationUtils module. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2822>
This commit is contained in:
@ -15,7 +15,7 @@ const GdmUtil = imports.gdm.util;
|
||||
const Params = imports.misc.params;
|
||||
const ShellEntry = imports.ui.shellEntry;
|
||||
const UserWidget = imports.ui.userWidget;
|
||||
const Util = imports.misc.util;
|
||||
const {wiggle} = imports.misc.animationUtils;
|
||||
|
||||
var DEFAULT_BUTTON_WELL_ICON_SIZE = 16;
|
||||
var DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1000;
|
||||
@ -391,7 +391,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
|
||||
|
||||
if (wasQueryingService)
|
||||
Util.wiggle(this._entry);
|
||||
wiggle(this._entry);
|
||||
}
|
||||
|
||||
_onVerificationComplete() {
|
||||
@ -566,7 +566,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
this._message.opacity = 0;
|
||||
}
|
||||
|
||||
Util.wiggle(this._message, wiggleParameters);
|
||||
wiggle(this._message, wiggleParameters);
|
||||
}
|
||||
|
||||
updateSensitivity(sensitive) {
|
||||
|
Reference in New Issue
Block a user