From 451730000c86e519cdbe4a7b58f3eb100c262291 Mon Sep 17 00:00:00 2001 From: Conrad Pankoff Date: Sun, 6 Oct 2019 23:27:01 +1100 Subject: [PATCH] LibHTML: Trim image alt text to the right if necessary --- Libraries/LibHTML/Layout/LayoutImage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibHTML/Layout/LayoutImage.cpp b/Libraries/LibHTML/Layout/LayoutImage.cpp index 91624650e0..2e286e5023 100644 --- a/Libraries/LibHTML/Layout/LayoutImage.cpp +++ b/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); + context.painter().draw_text(rect(), alt, TextAlignment::Center, Color::Black, TextElision::Right); } else { context.painter().draw_scaled_bitmap(rect(), *node().bitmap(), node().bitmap()->rect()); }