mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibHTML: Trim image alt text to the right if necessary
This commit is contained in:
parent
6eef6f4f1d
commit
451730000c
Notes:
sideshowbarker
2024-07-19 11:46:59 +09:00
Author: https://github.com/deoxxa Commit: https://github.com/SerenityOS/serenity/commit/451730000c8 Pull-request: https://github.com/SerenityOS/serenity/pull/634
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);
|
||||
context.painter().draw_text(rect(), alt, TextAlignment::Center, Color::Black, TextElision::Right);
|
||||
} else {
|
||||
context.painter().draw_scaled_bitmap(rect(), *node().bitmap(), node().bitmap()->rect());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue