1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Make disclosure marker bounds square

This makes sure we actually render an equilateral triangle
inside a square.
This commit is contained in:
Simon Wanner 2023-06-02 23:07:25 +02:00 committed by Andreas Kling
parent 293ece2292
commit 870bcd56df

View file

@ -999,6 +999,9 @@ void BlockFormattingContext::layout_list_item_marker(ListItemBox const& list_ite
marker_state.set_content_height(max(image_height, marker.font().pixel_size_rounded_up() + 1).value());
if (marker.list_style_type() == CSS::ListStyleType::DisclosureClosed || marker.list_style_type() == CSS::ListStyleType::DisclosureOpen)
marker_state.set_content_width(marker_state.content_height());
auto final_marker_width = marker_state.content_width() + default_marker_width;
if (marker.list_style_position() == CSS::ListStylePosition::Inside) {