mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 16:50:11 +00:00
Adapt gtk_icon_info_load_symbolic to librsvg limitations too
Pointed out by Owen Taylor.
This commit is contained in:
parent
f531787875
commit
5b7add024d
@ -3074,7 +3074,7 @@ gdk_color_to_css (GdkColor *color)
|
|||||||
static gchar *
|
static gchar *
|
||||||
gdk_rgba_to_css (GdkRGBA *color)
|
gdk_rgba_to_css (GdkRGBA *color)
|
||||||
{
|
{
|
||||||
/* drop a for now, since librsvg does not understand rgba() */
|
/* drop alpha for now, since librsvg does not understand rgba() */
|
||||||
return g_strdup_printf ("rgb(%d,%d,%d)",
|
return g_strdup_printf ("rgb(%d,%d,%d)",
|
||||||
(gint)(color->red * 255),
|
(gint)(color->red * 255),
|
||||||
(gint)(color->green * 255),
|
(gint)(color->green * 255),
|
||||||
@ -3221,18 +3221,18 @@ gtk_icon_info_load_symbolic (GtkIconInfo *icon_info,
|
|||||||
if (was_symbolic)
|
if (was_symbolic)
|
||||||
*was_symbolic = TRUE;
|
*was_symbolic = TRUE;
|
||||||
|
|
||||||
css_fg = gdk_rgba_to_string (fg);
|
css_fg = gdk_rgba_to_css (fg);
|
||||||
|
|
||||||
css_success = css_warning = css_error = NULL;
|
css_success = css_warning = css_error = NULL;
|
||||||
|
|
||||||
if (warning_color)
|
if (warning_color)
|
||||||
css_warning = gdk_rgba_to_string (warning_color);
|
css_warning = gdk_rgba_to_css (warning_color);
|
||||||
|
|
||||||
if (error_color)
|
if (error_color)
|
||||||
css_error = gdk_rgba_to_string (error_color);
|
css_error = gdk_rgba_to_css (error_color);
|
||||||
|
|
||||||
if (success_color)
|
if (success_color)
|
||||||
css_success = gdk_rgba_to_string (success_color);
|
css_success = gdk_rgba_to_css (success_color);
|
||||||
|
|
||||||
pixbuf = _gtk_icon_info_load_symbolic_internal (icon_info,
|
pixbuf = _gtk_icon_info_load_symbolic_internal (icon_info,
|
||||||
css_fg, css_success,
|
css_fg, css_success,
|
||||||
|
Loading…
Reference in New Issue
Block a user