userWidget: Always set actor size inside update()
We also want to ensure the Avatar StBin is sized correctly when an icon child is used, so always set the actor size inside the `update()` function. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1018
This commit is contained in:
parent
38b38732d3
commit
2a3875775d
@ -83,13 +83,13 @@ class Avatar extends St.Bin {
|
||||
iconFile = null;
|
||||
}
|
||||
|
||||
let { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
|
||||
this.set_size(
|
||||
this._iconSize * scaleFactor,
|
||||
this._iconSize * scaleFactor);
|
||||
|
||||
if (iconFile) {
|
||||
this.child = null;
|
||||
|
||||
let { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
|
||||
this.set_size(
|
||||
this._iconSize * scaleFactor,
|
||||
this._iconSize * scaleFactor);
|
||||
this.style = `
|
||||
background-image: url("${iconFile}");
|
||||
background-size: cover;`;
|
||||
|
Loading…
Reference in New Issue
Block a user