[gnome-software: 1/2] app: When retrieving an icon, fall back to scale 1




commit 26fb1b45b7c3ccde21a7f27fa236cf9b55b3946e
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Aug 11 11:46:34 2021 +0200

    app: When retrieving an icon, fall back to scale 1
    
    This ensures consistency of the application's state at all scales.

 lib/gs-app.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 0469dcdcd..7411400eb 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -1909,7 +1909,10 @@ gs_app_get_icon_for_size (GsApp       *app,
                        return g_object_ref (icon);
        }
 
-       if (fallback_icon_name != NULL) {
+       if (scale > 1) {
+               g_debug ("Retrying at scale 1");
+               return gs_app_get_icon_for_size (app, size, 1, fallback_icon_name);
+       } else if (fallback_icon_name != NULL) {
                g_debug ("Using fallback icon %s", fallback_icon_name);
                return g_themed_icon_new (fallback_icon_name);
        } else {


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