mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
LibWeb: Don't draw image alt text frames with "rough" rect
This was an accident in 3645b676fb
This commit is contained in:
parent
217cb01708
commit
cf315338ec
Notes:
sideshowbarker
2024-07-16 22:16:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cf315338ec Pull-request: https://github.com/SerenityOS/serenity/pull/23962
Binary file not shown.
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 1.6 KiB |
|
@ -66,7 +66,7 @@ void ImagePaintable::paint(PaintContext& context, PaintPhase phase) const
|
|||
auto image_rect = context.rounded_device_rect(absolute_rect());
|
||||
if (m_renders_as_alt_text) {
|
||||
auto enclosing_rect = context.enclosing_device_rect(absolute_rect()).to_type<int>();
|
||||
context.recording_painter().draw_rect(enclosing_rect, Gfx::Color::Black, 1);
|
||||
context.recording_painter().draw_rect(enclosing_rect, Gfx::Color::Black);
|
||||
context.recording_painter().draw_text(enclosing_rect, m_alt_text, Platform::FontPlugin::the().default_font(), Gfx::TextAlignment::Center, computed_values().color(), Gfx::TextElision::Right);
|
||||
} else if (auto bitmap = m_image_provider.current_image_bitmap(image_rect.size().to_type<int>())) {
|
||||
ScopedCornerRadiusClip corner_clip { context, image_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
|
||||
|
|
Loading…
Reference in a new issue