Skip to content

Commit

Permalink
user applet: Fix updating the avatar icon size when the panel
Browse files Browse the repository at this point in the history
height changes.

Fixes: linuxmint/mint22-beta#41
  • Loading branch information
mtwebster committed Jul 2, 2024
1 parent 8a1d1e6 commit 62d50ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions files/usr/share/cinnamon/applets/user@cinnamon.org/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 62d50ef

Please sign in to comment.