Revert "dash: Add minor optimization to _adjustIconSize()"
Ooops, a patch got lost in rebase ... This reverts commit 6d95e8b98874bed67bd895a505fd198a350a69cb.
This commit is contained in:
parent
6d95e8b988
commit
1721db6d8d
@ -427,20 +427,14 @@ Dash.prototype = {
|
|||||||
|
|
||||||
let firstIcon = iconChildren[0]._delegate.child._delegate.icon;
|
let firstIcon = iconChildren[0]._delegate.child._delegate.icon;
|
||||||
|
|
||||||
let minHeight, natHeight;
|
// Icons may be animating, so enforce the current icon size
|
||||||
|
// during the size request
|
||||||
// Enforce the current icon size during the size request if
|
|
||||||
// the icon is animating
|
|
||||||
if (firstIcon._animating) {
|
|
||||||
let [currentWidth, currentHeight] = firstIcon.icon.get_size();
|
let [currentWidth, currentHeight] = firstIcon.icon.get_size();
|
||||||
|
|
||||||
firstIcon.icon.set_size(this.iconSize, this.iconSize);
|
firstIcon.icon.set_size(this.iconSize, this.iconSize);
|
||||||
[minHeight, natHeight] = iconChildren[0].get_preferred_height(-1);
|
let [minHeight, natHeight] = iconChildren[0].get_preferred_height(-1);
|
||||||
|
|
||||||
firstIcon.icon.set_size(currentWidth, currentHeight);
|
firstIcon.icon.set_size(currentWidth, currentHeight);
|
||||||
} else {
|
|
||||||
[minHeight, natHeight] = iconChildren[0].get_preferred_height(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Subtract icon padding and box spacing from the available height
|
// Subtract icon padding and box spacing from the available height
|
||||||
@ -484,15 +478,11 @@ Dash.prototype = {
|
|||||||
icon.icon.set_size(icon.icon.width * scale,
|
icon.icon.set_size(icon.icon.width * scale,
|
||||||
icon.icon.height * scale);
|
icon.icon.height * scale);
|
||||||
|
|
||||||
icon._animating = true;
|
|
||||||
Tweener.addTween(icon.icon,
|
Tweener.addTween(icon.icon,
|
||||||
{ width: targetWidth,
|
{ width: targetWidth,
|
||||||
height: targetHeight,
|
height: targetHeight,
|
||||||
time: DASH_ANIMATION_TIME,
|
time: DASH_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad'
|
||||||
onComplete: function() {
|
|
||||||
icon._animating = false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user