LibCards: Don't draw the first card smaller than the others
This commit is contained in:
parent
7843287d89
commit
6093236424
Notes:
sideshowbarker
2024-07-18 16:56:21 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/6093236424c Pull-request: https://github.com/SerenityOS/serenity/pull/7763
1 changed files with 2 additions and 2 deletions
|
@ -82,8 +82,8 @@ Card::Card(Type type, uint8_t value)
|
|||
auto target_size = Gfx::IntSize(static_cast<int>(aspect_ratio * (height - 5)), height - 5);
|
||||
|
||||
bg_painter.fill_rect_with_rounded_corners(paint_rect, Color::Black, 5, 5, 5, 5);
|
||||
paint_rect.shrink(2, 2);
|
||||
bg_painter.fill_rect_with_rounded_corners(paint_rect, Color::White, 4, 4, 4, 4);
|
||||
auto inner_paint_rect = paint_rect.shrunken(2, 2);
|
||||
bg_painter.fill_rect_with_rounded_corners(inner_paint_rect, Color::White, 4, 4, 4, 4);
|
||||
|
||||
bg_painter.draw_scaled_bitmap(
|
||||
{ { (width - target_size.width()) / 2, (height - target_size.height()) / 2 }, target_size },
|
||||
|
|
Loading…
Add table
Reference in a new issue