iconGrid: Delay updating adjustment value on page switch
When switching to a newly created page, the adjustment's limits haven't been adjusted yet. As a result, setting the new value only works when the transition is animated. To fix the non-animated case, use a MetaLater to set the adjustment value. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6315 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2670>
This commit is contained in:
parent
c676bc04f9
commit
7ada79f6d9
@ -1349,10 +1349,14 @@ var IconGrid = GObject.registerClass({
|
|||||||
if (!this.mapped)
|
if (!this.mapped)
|
||||||
animate = false;
|
animate = false;
|
||||||
|
|
||||||
|
global.compositor.get_laters().add(
|
||||||
|
Meta.LaterType.BEFORE_REDRAW, () => {
|
||||||
adjustment.ease(newValue, {
|
adjustment.ease(newValue, {
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
|
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
|
||||||
duration: animate ? PAGE_SWITCH_TIME : 0,
|
duration: animate ? PAGE_SWITCH_TIME : 0,
|
||||||
});
|
});
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user