Consider scale factor when using animate hovering app icon

fixes #1613, fixes #1412
This commit is contained in:
Charles Gagnon
2022-04-08 09:07:38 -04:00
parent 6675c60bcb
commit 4e4efeb06e

View File

@@ -417,11 +417,13 @@ var TaskbarAppIcon = GObject.registerClass({
// It increases the "resolution" of the icon without changing the icon size.
this.icon.createIcon = (iconSize) => this.app.create_icon_texture(2 * iconSize);
this._iconIconBinActorAddedId = this.icon._iconBin.connect('actor-added', () => {
let size = this.icon.iconSize * Utils.getScaleFactor()
if (this.icon._iconBin.child.mapped) {
this.icon._iconBin.child.set_size(this.icon.iconSize, this.icon.iconSize);
this.icon._iconBin.child.set_size(size, size);
} else {
let iconMappedId = this.icon._iconBin.child.connect('notify::mapped', () => {
this.icon._iconBin.child.set_size(this.icon.iconSize, this.icon.iconSize);
this.icon._iconBin.child.set_size(size, size);
this.icon._iconBin.child.disconnect(iconMappedId);
});
}