mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:07:45 +00:00
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:
parent
c6d494513e
commit
8d8fcd0d64
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
painter.fill_rect_with_rounded_corners(paint_rect, Color::Black, Card::card_radius);
|
||||||
paint_rect.shrink(2, 2);
|
paint_rect.shrink(2, 2);
|
||||||
painter.fill_rect_with_rounded_corners(paint_rect, background_complement, Card::card_radius - 1);
|
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));
|
painter.blit({ 4, 4 }, source_to_highlight, source_to_highlight.rect().shrunken(8, 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue