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.
This commit is contained in:
Timothy Flynn 2023-01-05 10:13:35 -05:00 committed by Andreas Kling
parent c6d494513e
commit 8d8fcd0d64
Notes: sideshowbarker 2024-07-17 05:00:08 +09:00

View file

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