GtkSymbolicColor: Only require styleproperties when resolving named colors.

It is not necessary for resolving colors based on literals,
so be a bit less strict here.
This commit is contained in:
Carlos Garnacho 2010-11-06 12:36:05 +01:00
parent 525963d74d
commit 765f653df6

View File

@ -488,7 +488,6 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
GdkRGBA *resolved_color)
{
g_return_val_if_fail (color != NULL, FALSE);
g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE);
g_return_val_if_fail (resolved_color != NULL, FALSE);
switch (color->type)
@ -500,6 +499,8 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
{
GtkSymbolicColor *named_color;
g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE);
named_color = gtk_style_properties_lookup_color (props, color->name);
if (!named_color)