diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js index a3bf4cba1..a11b34b02 100644 --- a/js/ui/userWidget.js +++ b/js/ui/userWidget.js @@ -46,15 +46,14 @@ var Avatar = class { if (iconFile) { let file = Gio.File.new_for_path(iconFile); this.actor.child = null; - this.actor.style = 'background-image: url("%s");'.format(iconFile); + this.actor.style = ` + background-image: url("${iconFile}"); + background-size: ${this._iconSize}px`; } else { this.actor.style = null; this.actor.child = new St.Icon({ icon_name: 'avatar-default-symbolic', icon_size: this._iconSize }); } - - let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; - this.actor.set_size(this._iconSize * scaleFactor, this._iconSize * scaleFactor); } };