st: Move slow-down-factor into settings

Now that we have a Settings singleton, we have a better place for the
slow-down-factor than an awkward extern variable.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/656
This commit is contained in:
Florian Müllner
2019-07-25 12:50:26 +02:00
committed by Georges Basile Stavracas Neto
parent 5295866eff
commit 12b8fb15b1
8 changed files with 68 additions and 43 deletions

View File

@ -211,8 +211,9 @@ var ClutterFrameTicker = class {
}
start() {
if (St.get_slow_down_factor() > 0)
Tweener.setTimeScale(1 / St.get_slow_down_factor());
let settings = St.Settings.get();
if (settings.slow_down_factor > 0)
Tweener.setTimeScale(1 / settings.slow_down_factor);
this._timeline.start();
global.begin_work();
}