forked from AuroraMiddleware/gtk
styleproperty: Add _gtk_style_property_is_inherit()
And use it instead of gtk_style_param_get_inherit()
This commit is contained in:
parent
abeaad6166
commit
fd4ffbb6da
@ -1126,7 +1126,7 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset,
|
||||
return;
|
||||
}
|
||||
|
||||
ruleset->has_inherit |= gtk_style_param_get_inherit (prop->pspec);
|
||||
ruleset->has_inherit |= _gtk_style_property_is_inherit (prop);
|
||||
g_hash_table_insert (ruleset->style, (gpointer) prop, value);
|
||||
}
|
||||
|
||||
@ -1327,7 +1327,7 @@ gtk_css_provider_get_style (GtkStyleProvider *provider,
|
||||
{
|
||||
GtkStyleProperty *prop = key;
|
||||
|
||||
if (l != length && !gtk_style_param_get_inherit (prop->pspec))
|
||||
if (l != length && !_gtk_style_property_is_inherit (prop))
|
||||
continue;
|
||||
|
||||
_gtk_style_properties_set_property_by_property (props,
|
||||
|
@ -1941,6 +1941,14 @@ _gtk_style_property_default_value (const GtkStyleProperty *property,
|
||||
g_param_value_set_default (property->pspec, value);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gtk_style_property_is_inherit (const GtkStyleProperty *property)
|
||||
{
|
||||
g_return_val_if_fail (property != NULL, FALSE);
|
||||
|
||||
return gtk_style_param_get_inherit (property->pspec);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gtk_style_property_is_shorthand (const GtkStyleProperty *property)
|
||||
{
|
||||
|
@ -61,6 +61,8 @@ void _gtk_style_property_register (GParamSpec
|
||||
GtkStylePrintFunc print_func,
|
||||
GtkStyleDefaultValueFunc default_value_func);
|
||||
|
||||
gboolean _gtk_style_property_is_inherit (const GtkStyleProperty *property);
|
||||
|
||||
void _gtk_style_property_default_value (const GtkStyleProperty *property,
|
||||
GtkStyleProperties *properties,
|
||||
GValue *value);
|
||||
|
Loading…
Reference in New Issue
Block a user