Skip to content

Theme parser error:Circular gradient cannot have percentage as size #22

@lytico

Description

@lytico

(Platform.Maui.Linux.Gtk4.Sample:196530): Gtk-WARNING **: 15:08:54.782: Theme parser error: :1:57-60: Circular gradient cannot have percentage as size

static string BuildLinearGradientCss(LinearGradientPaint paint)
{
// MAUI uses StartPoint/EndPoint in 0-1 relative coordinates
var angle = CalculateGradientAngle(paint.StartPoint, paint.EndPoint);
var stops = string.Join(", ",
paint.GradientStops
.OrderBy(s => s.Offset)
.Select(s => $"{ToGtkColor(s.Color)} {s.Offset * 100:F0}%"));
return $"background-image: linear-gradient({angle:F0}deg, {stops}); background-color: transparent;";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions