mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Fix 3.36 grid icon positions
This commit is contained in:
16
taskbar.js
16
taskbar.js
@@ -1098,19 +1098,12 @@ var taskbar = Utils.defineClass({
|
||||
if (!Main.overview._shown) {
|
||||
this.forcedOverview = true;
|
||||
let grid = Main.overview.viewSelector.appDisplay._views[visibleView].view._grid;
|
||||
let onShownCbs = [];
|
||||
let onShownCb;
|
||||
let overviewShownId = Main.overview.connect('shown', () => {
|
||||
Main.overview.disconnect(overviewShownId);
|
||||
onShownCbs.forEach(cb => cb());
|
||||
onShownCb();
|
||||
});
|
||||
|
||||
if (Config.PACKAGE_VERSION > '3.35.9') {
|
||||
let animateIconPosition = IconGrid.animateIconPosition;
|
||||
|
||||
IconGrid.animateIconPosition = (icon, box, flags, nChangedIcons) => icon.allocate(box, flags);
|
||||
onShownCbs.push(() => IconGrid.animateIconPosition = animateIconPosition);
|
||||
}
|
||||
|
||||
if (animate) {
|
||||
// Animate in the the appview, hide the appGrid to avoiud flashing
|
||||
// Go to the appView before entering the overview, skipping the workspaces.
|
||||
@@ -1126,13 +1119,14 @@ var taskbar = Utils.defineClass({
|
||||
// and the appgrid could already be allocated from previous shown.
|
||||
// It has to be triggered after the overview is shown as wrong coordinates are obtained
|
||||
// otherwise.
|
||||
onShownCbs.push(() => Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
onShownCb = () => Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
grid.actor.opacity = 255;
|
||||
grid.animateSpring(IconGrid.AnimationDirection.IN, this.showAppsButton);
|
||||
}));
|
||||
});
|
||||
} else {
|
||||
Main.overview.viewSelector._activePage = Main.overview.viewSelector._appsPage;
|
||||
Main.overview.viewSelector._activePage.show();
|
||||
onShownCb = () => grid.emit('animation-done');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user