mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:57:35 +00:00
LibWeb: Shrink the inner border radii to accommodate the border widths
This fixes the shape of the subreddit logo on new reddit.
This commit is contained in:
parent
890514a057
commit
b68f48eb71
5 changed files with 16 additions and 10 deletions
|
@ -49,7 +49,7 @@ void ImagePaintable::paint(PaintContext& context, PaintPhase phase) const
|
|||
context.painter().draw_text(enclosing_int_rect(absolute_rect()), alt, Gfx::TextAlignment::Center, computed_values().color(), Gfx::TextElision::Right);
|
||||
} else if (auto bitmap = layout_box().image_loader().bitmap(layout_box().image_loader().current_frame_index())) {
|
||||
auto image_rect = absolute_rect().to_rounded<int>();
|
||||
ScopedCornerRadiusClip corner_clip { context.painter(), image_rect, normalized_border_radii_data() };
|
||||
ScopedCornerRadiusClip corner_clip { context.painter(), image_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
|
||||
context.painter().draw_scaled_bitmap(image_rect, *bitmap, bitmap->rect(), 1.0f, to_gfx_scaling_mode(computed_values().image_rendering()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue