mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 00:11:29 +00:00
GtkCssProvider: Compare GtkWidgetPath regions with css.
This commit is contained in:
parent
977a972358
commit
67c4f8d02e
@ -384,6 +384,24 @@ compare_selector_element (GtkWidgetPath *path,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else if (elem->elem_type == SELECTOR_REGION)
|
||||
{
|
||||
const gchar *region_name;
|
||||
GtkChildClassFlags flags;
|
||||
|
||||
/* FIXME: Need GQuark API here */
|
||||
region_name = g_quark_to_string (elem->region.name);
|
||||
|
||||
if (!gtk_widget_path_iter_has_region (path, index, region_name, &flags))
|
||||
return FALSE;
|
||||
|
||||
if (elem->region.flags != 0 &&
|
||||
(flags & elem->region.flags) == 0)
|
||||
return FALSE;
|
||||
|
||||
*score = 0xF;
|
||||
return TRUE;
|
||||
}
|
||||
else if (elem->elem_type == SELECTOR_GLOB)
|
||||
{
|
||||
/* Treat as lowest matching type */
|
||||
|
Loading…
Reference in New Issue
Block a user