From 4e4efeb06e893ebf2f6289944cc34cd91f1c4b5c Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Fri, 8 Apr 2022 09:07:38 -0400 Subject: [PATCH] Consider scale factor when using animate hovering app icon fixes #1613, fixes #1412 --- appIcons.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appIcons.js b/appIcons.js index 2bbdd74..05b0cf7 100644 --- a/appIcons.js +++ b/appIcons.js @@ -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); }); }