From 62d50ef2c0fe52ee4c4274cdefa1b08109e98f99 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Tue, 2 Jul 2024 12:39:33 -0400 Subject: [PATCH] user applet: Fix updating the avatar icon size when the panel height changes. Fixes: linuxmint/mint22-beta#41 --- .../usr/share/cinnamon/applets/user@cinnamon.org/applet.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/usr/share/cinnamon/applets/user@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/user@cinnamon.org/applet.js index 34165b5d46..af3e5a6813 100644 --- a/files/usr/share/cinnamon/applets/user@cinnamon.org/applet.js +++ b/files/usr/share/cinnamon/applets/user@cinnamon.org/applet.js @@ -172,9 +172,11 @@ class CinnamonUserApplet extends Applet.TextApplet { _updatePanelIcon() { if (this.display_image) { - if (this._panel_avatar == null) { - this._panel_avatar = new UserWidget.Avatar(this._user, { iconSize: this.getPanelIconSize(St.IconType.FULLCOLOR) }); + if (this._panel_avatar != null) { + this._panel_avatar.destroy() } + + this._panel_avatar = new UserWidget.Avatar(this._user, { iconSize: this.getPanelIconSize(St.IconType.FULLCOLOR) }); this._panel_icon_box.set_child(this._panel_avatar); this._panel_avatar.update(); this._panel_avatar.show();