Kaynağa Gözat

LibHTML: Use current style's text colour for alt text on images

Conrad Pankoff 5 yıl önce
ebeveyn
işleme
2cf5d69a67
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      Libraries/LibHTML/Layout/LayoutImage.cpp

+ 1 - 1
Libraries/LibHTML/Layout/LayoutImage.cpp

@@ -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());
     }