forked from AuroraMiddleware/gtk
Drop support for one-stop gradients
These have been deprecated for a while. Time to make this an error for GTK+ 4.
This commit is contained in:
parent
737cae8e10
commit
d3727817ff
@ -384,10 +384,9 @@ gtk_css_image_linear_parse (GtkCssImage *image,
|
|||||||
|
|
||||||
if (linear->stops->len < 2)
|
if (linear->stops->len < 2)
|
||||||
{
|
{
|
||||||
_gtk_css_parser_error_full (parser,
|
_gtk_css_parser_error (parser, "%s() needs at least 2 color stops.",
|
||||||
GTK_CSS_PROVIDER_ERROR_DEPRECATED,
|
linear->repeating ? "repeating-linear-gradient" : "linear-gradient");
|
||||||
"Using one color stop with %s() is deprecated.",
|
return FALSE;
|
||||||
linear->repeating ? "repeating-linear-gradient" : "linear-gradient");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_gtk_css_parser_try (parser, ")", TRUE))
|
if (!_gtk_css_parser_try (parser, ")", TRUE))
|
||||||
|
@ -379,10 +379,9 @@ gtk_css_image_radial_parse (GtkCssImage *image,
|
|||||||
|
|
||||||
if (radial->stops->len < 2)
|
if (radial->stops->len < 2)
|
||||||
{
|
{
|
||||||
_gtk_css_parser_error_full (parser,
|
_gtk_css_parser_error (parser, "%s() needs at least 2 color stops.",
|
||||||
GTK_CSS_PROVIDER_ERROR_DEPRECATED,
|
radial->repeating ? "repeating-radial-gradient" : "radial-gradient");
|
||||||
"Using one color stop with %s() is deprecated.",
|
return FALSE;
|
||||||
radial->repeating ? "repeating-radial-gradient" : "radial-gradient");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_gtk_css_parser_try (parser, ")", TRUE))
|
if (!_gtk_css_parser_try (parser, ")", TRUE))
|
||||||
|
Loading…
Reference in New Issue
Block a user