mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +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
Notes:
sideshowbarker
2024-07-17 05:00:08 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/8d8fcd0d64 Pull-request: https://github.com/SerenityOS/serenity/pull/16834 Reviewed-by: https://github.com/gmta ✅
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…
Reference in a new issue