1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 20:27:46 +00:00

LibWeb: Fix regression in painting the 'caret' icon on GitHub

This commit reimplements the (normally) 45 degree (depends on
the widths) connection between to adjacent borders. Which is
needed to paint the 'caret' icon seen in a few buttons on GitHub.

The issue of overlapping pixels while painting this has also
been solved for the 45 degree case (the the most likely case,
the other cases only occur of mixed-with borders).
This commit is contained in:
MacDue 2022-06-14 13:22:29 +01:00 committed by Linus Groh
parent 81cca937b1
commit c9b363de56
2 changed files with 85 additions and 18 deletions

View file

@ -56,7 +56,7 @@ struct BordersData {
CSS::BorderData bottom;
CSS::BorderData left;
};
void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& rect, BordersData const& borders_data);
void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& rect, BorderRadiiData const& border_radii_data, BordersData const& borders_data);
void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiiData const& border_radii_data, BordersData const&);
}