st/theme-node: Support "auto" in lengths

This allows resetting a fixed size to the default in a more specific
selector.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/971
This commit is contained in:
Florian Müllner 2020-01-31 17:56:40 +01:00
parent 4871845d01
commit fc36837606

View File

@ -1707,7 +1707,13 @@ do_size_property (StThemeNode *node,
CRDeclaration *decl,
int *node_value)
{
get_length_from_term_int (node, decl->value, FALSE, node_value);
CRTerm *term = decl->value;
if (term->type == TERM_IDENT &&
strcmp (term->content.str->stryng->str, "auto") == 0)
*node_value = -1;
else
get_length_from_term_int (node, term, FALSE, node_value);
}
void