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
@ -69,8 +69,8 @@ class RadialShaderEffect extends Shell.GLSLEffect {
|
||||
* - inhibitEvents: whether to inhibit events for @container
|
||||
* - width: shade actor width
|
||||
* - height: shade actor height
|
||||
* - fadeInTime: seconds used to fade in
|
||||
* - fadeOutTime: seconds used to fade out
|
||||
* - fadeInTime: milliseconds used to fade in
|
||||
* - fadeOutTime: milliseconds used to fade out
|
||||
*
|
||||
* Lightbox creates a dark translucent "shade" actor to hide the
|
||||
* contents of @container, and allows you to specify particular actors
|
||||
@ -160,7 +160,7 @@ var Lightbox = class Lightbox {
|
||||
Tweener.addTween(effect,
|
||||
{ brightness: VIGNETTE_BRIGHTNESS,
|
||||
vignetteSharpness: VIGNETTE_SHARPNESS,
|
||||
time: fadeInTime,
|
||||
time: fadeInTime / 1000,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: () => {
|
||||
this.shown = true;
|
||||
@ -171,7 +171,7 @@ var Lightbox = class Lightbox {
|
||||
Tweener.removeTweens(this.actor);
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 255 * this._fadeFactor,
|
||||
time: fadeInTime,
|
||||
time: fadeInTime / 1000,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: () => {
|
||||
this.shown = true;
|
||||
@ -195,7 +195,7 @@ var Lightbox = class Lightbox {
|
||||
{ brightness: 1.0,
|
||||
vignetteSharpness: 0.0,
|
||||
opacity: 0,
|
||||
time: fadeOutTime,
|
||||
time: fadeOutTime / 1000,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: () => {
|
||||
this.actor.hide();
|
||||
@ -205,7 +205,7 @@ var Lightbox = class Lightbox {
|
||||
Tweener.removeTweens(this.actor);
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 0,
|
||||
time: fadeOutTime,
|
||||
time: fadeOutTime / 1000,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: () => {
|
||||
this.actor.hide();
|
||||
|
Reference in New Issue
Block a user