Commit d9dab98a authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

GtkCssProvider: enable parsing negative GtkBorders

this can be used as in regular CSS under some situations,
so child items overlap the parent element's border.
parent 2ec40cac
......@@ -2682,14 +2682,14 @@ border_parse_str (const gchar *str,
border = gtk_border_new ();
SKIP_SPACES (str);
if (!g_ascii_isdigit (*str))
if (!g_ascii_isdigit (*str) && *str != '-')
return border;
first = unit_parse_str (str, end_str);
str = *end_str;
SKIP_SPACES (str);
if (!g_ascii_isdigit (*str))
if (!g_ascii_isdigit (*str) && *str != '-')
{
border->left = border->right = border->top = border->bottom = (gint) first;
*end_str = (gchar *) str;
......@@ -2700,7 +2700,7 @@ border_parse_str (const gchar *str,
str = *end_str;
SKIP_SPACES (str);
if (!g_ascii_isdigit (*str))
if (!g_ascii_isdigit (*str) && *str != '-')
{
border->top = border->bottom = (gint) first;
border->left = border->right = (gint) second;
......@@ -2712,7 +2712,7 @@ border_parse_str (const gchar *str,
str = *end_str;
SKIP_SPACES (str);
if (!g_ascii_isdigit (*str))
if (!g_ascii_isdigit (*str) && *str != '-')
{
border->top = (gint) first;
border->left = border->right = (gint) second;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment