[gedit] Allow symbolic colours to be applied to symbolic icons



commit b12398de45d9312c793eb4888c66eeea0a790d7b
Author: stuarthayhurst <stuart a hayhurst gmail com>
Date:   Mon Aug 16 11:37:35 2021 +0100

    Allow symbolic colours to be applied to symbolic icons
    
    Closes: #452
    Closes: !119

 gedit/gedit-tab.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 85c0451d8..d305f8d7e 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1584,6 +1584,8 @@ _gedit_tab_get_icon (GeditTab *tab)
        {
                GdkScreen *screen;
                GtkIconTheme *theme;
+               GtkIconInfo *info;
+               GtkStyleContext *context;
                gint icon_size;
 
                screen = gtk_widget_get_screen (GTK_WIDGET (tab));
@@ -1592,7 +1594,10 @@ _gedit_tab_get_icon (GeditTab *tab)
 
                gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, NULL, &icon_size);
 
-               pixbuf = gtk_icon_theme_load_icon (theme, icon_name, icon_size, 0, NULL);
+               context = gtk_widget_get_style_context (GTK_WIDGET (tab));
+               info = gtk_icon_theme_lookup_icon (theme, icon_name, icon_size, 0);
+
+               pixbuf = gtk_icon_info_load_symbolic_for_context (info, context, NULL, NULL);
        }
 
        return pixbuf;


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