[gnome-shell] userWidget: Always set actor size inside update()



commit 2a3875775d91a821d804800abd423e61cb76aae4
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Sun Feb 16 23:16:52 2020 +0100

    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

 js/ui/userWidget.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js
index d749ceebe2..c84b840cef 100644
--- a/js/ui/userWidget.js
+++ b/js/ui/userWidget.js
@@ -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;`;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]