From 8d8fcd0d648d3b851283d1122f6294ca80181c92 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 5 Jan 2023 10:13:35 -0500 Subject: [PATCH] LibCards: Draw the inside of card highlight rects with rounded corners Currently, the outside of the card highlight has rounded corners, but the inside has square corners. It looks a bit more polished if they are both rounded. --- Userland/Libraries/LibCards/CardPainter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibCards/CardPainter.cpp b/Userland/Libraries/LibCards/CardPainter.cpp index e073f9feaee..e018bb15d3c 100644 --- a/Userland/Libraries/LibCards/CardPainter.cpp +++ b/Userland/Libraries/LibCards/CardPainter.cpp @@ -247,7 +247,8 @@ void CardPainter::paint_highlighted_card(Gfx::Bitmap& bitmap, Gfx::Bitmap const& painter.fill_rect_with_rounded_corners(paint_rect, Color::Black, Card::card_radius); paint_rect.shrink(2, 2); painter.fill_rect_with_rounded_corners(paint_rect, background_complement, Card::card_radius - 1); - paint_rect.shrink(2, 2); + paint_rect.shrink(4, 4); + painter.fill_rect_with_rounded_corners(paint_rect, Color::White, Card::card_radius - 1); painter.blit({ 4, 4 }, source_to_highlight, source_to_highlight.rect().shrunken(8, 8)); }