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:
Florian Müllner
2019-08-02 01:13:10 +02:00
committed by Georges Basile Stavracas Neto
parent 31968ea53c
commit 476816732f
35 changed files with 232 additions and 230 deletions

View File

@ -12,7 +12,7 @@ const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const Params = imports.misc.params;
var SCROLL_TIME = 0.1;
var SCROLL_TIME = 100;
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
const _balancedParens = '\\([^\\s()<>]+\\)';
@ -428,7 +428,7 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
Tweener.addTween(adjustment,
{ value: value,
time: SCROLL_TIME,
time: SCROLL_TIME / 1000,
transition: 'easeOutQuad' });
}