background: Look at the duration per-step
We need to look at the duration of the current step of the slideshow to determine when to next queue an event, rather than the full slideshow duration. https://bugzilla.gnome.org/show_bug.cgi?id=695882
This commit is contained in:
parent
8edd7ad32e
commit
5fecd07045
@ -440,11 +440,11 @@ const Background = new Lang.Class({
|
|||||||
if (!this._cancellable || this._cancellable.is_cancelled())
|
if (!this._cancellable || this._cancellable.is_cancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!this._animation.duration)
|
if (!this._animation.transitionDuration)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let nSteps = 255 / ANIMATION_OPACITY_STEP_INCREMENT;
|
let nSteps = 255 / ANIMATION_OPACITY_STEP_INCREMENT;
|
||||||
let timePerStep = (this._animation.duration * 1000) / nSteps;
|
let timePerStep = (this._animation.transitionDuration * 1000) / nSteps;
|
||||||
|
|
||||||
let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
|
let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
|
||||||
timePerStep);
|
timePerStep);
|
||||||
@ -591,8 +591,8 @@ const Animation = new Lang.Class({
|
|||||||
|
|
||||||
this.filename = params.filename;
|
this.filename = params.filename;
|
||||||
this.keyFrameFiles = [];
|
this.keyFrameFiles = [];
|
||||||
this.duration = 0.0;
|
|
||||||
this.transitionProgress = 0.0;
|
this.transitionProgress = 0.0;
|
||||||
|
this.transitionDuration = 0.0;
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -604,7 +604,6 @@ const Animation = new Lang.Class({
|
|||||||
this._show.load_async(null,
|
this._show.load_async(null,
|
||||||
Lang.bind(this,
|
Lang.bind(this,
|
||||||
function(object, result) {
|
function(object, result) {
|
||||||
this.duration = this._show.get_total_duration();
|
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
if (callback)
|
if (callback)
|
||||||
callback();
|
callback();
|
||||||
@ -622,6 +621,7 @@ const Animation = new Lang.Class({
|
|||||||
|
|
||||||
let [progress, duration, isFixed, file1, file2] = this._show.get_current_slide(monitor.width, monitor.height);
|
let [progress, duration, isFixed, file1, file2] = this._show.get_current_slide(monitor.width, monitor.height);
|
||||||
|
|
||||||
|
this.transitionDuration = duration;
|
||||||
this.transitionProgress = progress;
|
this.transitionProgress = progress;
|
||||||
|
|
||||||
if (file1)
|
if (file1)
|
||||||
|
Loading…
Reference in New Issue
Block a user