iconGrid: Fix animation glitch
Since commit 520cea9394
, the opacity of icon grid children is used
both to skip children outside the current viewport and to hide the
real icons while animating icon clones.
As a result, a grid animation during an animation now ends up showing the
icons that are being animated. Avoid that glitch by leaving children's
opacity alone when there's an ongoing animation.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/582
This commit is contained in:
parent
c1c45f95af
commit
b4797956c7
@ -322,6 +322,7 @@ var IconGrid = GObject.registerClass({
|
|||||||
leftEmptySpace = availWidth - usedWidth;
|
leftEmptySpace = availWidth - usedWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let animating = this._clonesAnimating.length > 0;
|
||||||
let x = box.x1 + leftEmptySpace + this.leftPadding;
|
let x = box.x1 + leftEmptySpace + this.leftPadding;
|
||||||
let y = box.y1 + this.topPadding;
|
let y = box.y1 + this.topPadding;
|
||||||
let columnIndex = 0;
|
let columnIndex = 0;
|
||||||
@ -333,6 +334,7 @@ var IconGrid = GObject.registerClass({
|
|||||||
this._fillParent && childBox.y2 > availHeight - this.bottomPadding) {
|
this._fillParent && childBox.y2 > availHeight - this.bottomPadding) {
|
||||||
children[i].opacity = 0;
|
children[i].opacity = 0;
|
||||||
} else {
|
} else {
|
||||||
|
if (!animating)
|
||||||
children[i].opacity = 255;
|
children[i].opacity = 255;
|
||||||
children[i].allocate(childBox, flags);
|
children[i].allocate(childBox, flags);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user