icon theme: Export recoloring function

This will be used in subsequent commits.

https://bugzilla.gnome.org/show_bug.cgi?id=760536
This commit is contained in:
Matthias Clasen 2016-01-14 13:49:08 -05:00
parent 7d717c8113
commit 1b0ef71696
2 changed files with 18 additions and 12 deletions

View File

@ -4282,12 +4282,12 @@ rgba_to_pixel(const GdkRGBA *rgba,
pixel[3] = 255;
}
static GdkPixbuf *
color_symbolic_pixbuf (GdkPixbuf *symbolic,
const GdkRGBA *fg_color,
const GdkRGBA *success_color,
const GdkRGBA *warning_color,
const GdkRGBA *error_color)
GdkPixbuf *
gtk_icon_theme_color_symbolic_pixbuf (GdkPixbuf *symbolic,
const GdkRGBA *fg_color,
const GdkRGBA *success_color,
const GdkRGBA *warning_color,
const GdkRGBA *error_color)
{
int width, height, x, y, src_stride, dst_stride;
guchar *src_data, *dst_data;
@ -4397,11 +4397,11 @@ gtk_icon_info_load_symbolic_png (GtkIconInfo *icon_info,
return NULL;
}
return color_symbolic_pixbuf (icon_info->pixbuf,
fg ? fg : &fg_default,
success_color ? success_color : &success_default,
warning_color ? warning_color : &warning_default,
error_color ? error_color : &error_default);
return gtk_icon_theme_color_symbolic_pixbuf (icon_info->pixbuf,
fg ? fg : &fg_default,
success_color ? success_color : &success_default,
warning_color ? warning_color : &warning_default,
error_color ? error_color : &error_default);
}
static GdkPixbuf *
@ -4539,7 +4539,6 @@ gtk_icon_info_load_symbolic_svg (GtkIconInfo *icon_info,
}
static GdkPixbuf *
gtk_icon_info_load_symbolic_internal (GtkIconInfo *icon_info,
const GdkRGBA *fg,

View File

@ -31,4 +31,11 @@ GtkIconInfo *gtk_icon_info_new_for_file (GFile *file,
gint size,
gint scale);
GdkPixbuf * gtk_icon_theme_color_symbolic_pixbuf (GdkPixbuf *symbolic,
const GdkRGBA *fg_color,
const GdkRGBA *success_color,
const GdkRGBA *warning_color,
const GdkRGBA *error_color);
#endif /* __GTK_ICON_THEME_PRIVATE_H__ */