cleanup: Use milliseconds for animation times
The different units - seconds for Tweener and milliseconds for timeouts - are not a big issue currently, as there is little overlap. However this will change when we start using Clutter's own animation framework (which uses milliseconds as well), in particular where constants are shared between modules. In order to prepare for the transition, define all animation times as milliseconds and adjust them when passing them to Tweener. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/663
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
31968ea53c
commit
476816732f
@ -14,9 +14,9 @@ const Params = imports.misc.params;
|
||||
const Tweener = imports.ui.tweener;
|
||||
const Ripples = imports.ui.ripples;
|
||||
|
||||
var STARTUP_ANIMATION_TIME = 0.5;
|
||||
var KEYBOARD_ANIMATION_TIME = 0.15;
|
||||
var BACKGROUND_FADE_ANIMATION_TIME = 1.0;
|
||||
var STARTUP_ANIMATION_TIME = 500;
|
||||
var KEYBOARD_ANIMATION_TIME = 150;
|
||||
var BACKGROUND_FADE_ANIMATION_TIME = 1000;
|
||||
|
||||
var HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
|
||||
var HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
|
||||
@ -466,7 +466,7 @@ var LayoutManager = GObject.registerClass({
|
||||
backgroundActor.opacity = 0;
|
||||
Tweener.addTween(backgroundActor,
|
||||
{ opacity: 255,
|
||||
time: BACKGROUND_FADE_ANIMATION_TIME,
|
||||
time: BACKGROUND_FADE_ANIMATION_TIME / 1000,
|
||||
transition: 'easeOutQuad' });
|
||||
}
|
||||
}
|
||||
@ -700,7 +700,7 @@ var LayoutManager = GObject.registerClass({
|
||||
_startupAnimationGreeter() {
|
||||
Tweener.addTween(this.panelBox,
|
||||
{ translation_y: 0,
|
||||
time: STARTUP_ANIMATION_TIME,
|
||||
time: STARTUP_ANIMATION_TIME / 1000,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._startupAnimationComplete,
|
||||
onCompleteScope: this });
|
||||
@ -711,7 +711,7 @@ var LayoutManager = GObject.registerClass({
|
||||
{ scale_x: 1,
|
||||
scale_y: 1,
|
||||
opacity: 255,
|
||||
time: STARTUP_ANIMATION_TIME,
|
||||
time: STARTUP_ANIMATION_TIME / 1000,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._startupAnimationComplete,
|
||||
onCompleteScope: this });
|
||||
@ -743,7 +743,7 @@ var LayoutManager = GObject.registerClass({
|
||||
Tweener.addTween(this.keyboardBox,
|
||||
{ anchor_y: this.keyboardBox.height,
|
||||
opacity: 255,
|
||||
time: KEYBOARD_ANIMATION_TIME,
|
||||
time: KEYBOARD_ANIMATION_TIME / 1000,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._showKeyboardComplete,
|
||||
onCompleteScope: this
|
||||
@ -769,7 +769,7 @@ var LayoutManager = GObject.registerClass({
|
||||
Tweener.addTween(this.keyboardBox,
|
||||
{ anchor_y: 0,
|
||||
opacity: 0,
|
||||
time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
|
||||
time: immediate ? 0 : KEYBOARD_ANIMATION_TIME / 1000,
|
||||
transition: 'easeInQuad',
|
||||
onComplete: this._hideKeyboardComplete,
|
||||
onCompleteScope: this
|
||||
|
Reference in New Issue
Block a user