cssimage: Fix gradient start/end computation
This computation is only supposed to happen for repeating gradients, not for all of them.
This commit is contained in:
parent
b454fc50ed
commit
588ee411ad
@ -40,6 +40,8 @@ gtk_css_image_linear_get_start_end (GtkCssImageLinear *linear,
|
||||
double pos;
|
||||
guint i;
|
||||
|
||||
if (linear->repeating)
|
||||
{
|
||||
stop = &g_array_index (linear->stops, GtkCssImageLinearColorStop, 0);
|
||||
if (stop->offset == NULL)
|
||||
*start = 0;
|
||||
@ -62,6 +64,12 @@ gtk_css_image_linear_get_start_end (GtkCssImageLinear *linear,
|
||||
|
||||
if (stop->offset == NULL)
|
||||
*end = MAX (*end, 1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
*start = 0;
|
||||
*end = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user