mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:55:08 +00:00
LibHTML: Use current style's text colour for alt text on images
This commit is contained in:
parent
451730000c
commit
2cf5d69a67
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ void LayoutImage::render(RenderingContext& context)
|
|||
auto alt = node().alt();
|
||||
if (alt.is_empty())
|
||||
alt = node().src();
|
||||
context.painter().draw_text(rect(), alt, TextAlignment::Center, Color::Black, TextElision::Right);
|
||||
context.painter().draw_text(rect(), alt, TextAlignment::Center, style().color_or_fallback("color", document(), Color::Black), TextElision::Right);
|
||||
} else {
|
||||
context.painter().draw_scaled_bitmap(rect(), *node().bitmap(), node().bitmap()->rect());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue