mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-07 01:00:28 +00:00
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:
parent
525963d74d
commit
765f653df6
@ -488,7 +488,6 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
|
|||||||
GdkRGBA *resolved_color)
|
GdkRGBA *resolved_color)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (color != NULL, FALSE);
|
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);
|
g_return_val_if_fail (resolved_color != NULL, FALSE);
|
||||||
|
|
||||||
switch (color->type)
|
switch (color->type)
|
||||||
@ -500,6 +499,8 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
|
|||||||
{
|
{
|
||||||
GtkSymbolicColor *named_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);
|
named_color = gtk_style_properties_lookup_color (props, color->name);
|
||||||
|
|
||||||
if (!named_color)
|
if (!named_color)
|
||||||
|
Loading…
Reference in New Issue
Block a user