forked from AuroraMiddleware/gtk
GtkThemingEngine: Be a bit more robust against missing essential properties.
This commit is contained in:
parent
07eeae1582
commit
06d8676354
@ -2278,11 +2278,15 @@ gtk_theming_engine_render_layout (GtkThemingEngine *engine,
|
||||
"color", &other_fg,
|
||||
NULL);
|
||||
|
||||
if (fg_color && other_fg)
|
||||
{
|
||||
fg_color->red = CLAMP (fg_color->red + ((other_fg->red - fg_color->red) * progress), 0, 1);
|
||||
fg_color->green = CLAMP (fg_color->green + ((other_fg->green - fg_color->green) * progress), 0, 1);
|
||||
fg_color->blue = CLAMP (fg_color->blue + ((other_fg->blue - fg_color->blue) * progress), 0, 1);
|
||||
fg_color->alpha = CLAMP (fg_color->alpha + ((other_fg->alpha - fg_color->alpha) * progress), 0, 1);
|
||||
}
|
||||
|
||||
if (other_fg)
|
||||
gdk_rgba_free (other_fg);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user