[gnome-shell] appDisplay: Don't use symbolic icon at full size for system actions



commit 401b584384f534c11f89875628497c2cbd83feb1
Author: Sebastian Keller <skeller gnome org>
Date:   Mon Mar 22 01:50:25 2021 +0100

    appDisplay: Don't use symbolic icon at full size for system actions
    
    When attempting to account for scaling in e65e5ede the icon_size of the
    StIcon was set to the target size, overriding the icon-size set in the
    'system-action-icon' CSS, which was only half the size. The intent of
    that commit however was not to scale up the symbolic icon, but the
    circle around it. Do this by manually applying the scaling factor.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3940
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1777>

 js/ui/appDisplay.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 2cfd2cd032..b926aab98b 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1855,6 +1855,7 @@ var AppSearchProvider = class AppSearchProvider {
     }
 
     getResultMetas(apps, callback) {
+        const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
         let metas = [];
         for (let id of apps) {
             if (id.endsWith('.desktop')) {
@@ -1871,7 +1872,8 @@ var AppSearchProvider = class AppSearchProvider {
 
                 const createIcon = size => new St.Icon({
                     icon_name: iconName,
-                    icon_size: size,
+                    width: size * scaleFactor,
+                    height: size * scaleFactor,
                     style_class: 'system-action-icon',
                 });
 


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