From 55867a6972c3b387872ffe632d137c6df6682edc Mon Sep 17 00:00:00 2001 From: Zephyron Date: Fri, 30 May 2025 17:04:17 +1000 Subject: [PATCH] style: Use rounded corners instead of circular icons in grid view - Replace circular clipping with subtle rounded corners (radius = size/8) for a more modern and polished appearance. Signed-off-by: Zephyron --- src/citron/game_list_p.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/citron/game_list_p.h b/src/citron/game_list_p.h index bc8ef26a5..eb9609471 100644 --- a/src/citron/game_list_p.h +++ b/src/citron/game_list_p.h @@ -49,10 +49,10 @@ static QPixmap GetDefaultIcon(u32 size) { } /** - * Creates a round icon from a square pixmap + * Creates a rounded corner icon from a square pixmap * @param pixmap The source pixmap * @param size The desired size - * @return QPixmap round icon + * @return QPixmap rounded corner icon */ static QPixmap CreateRoundIcon(const QPixmap& pixmap, u32 size) { QPixmap rounded(size, size); @@ -61,9 +61,10 @@ static QPixmap CreateRoundIcon(const QPixmap& pixmap, u32 size) { QPainter painter(&rounded); painter.setRenderHint(QPainter::Antialiasing); - // Create a circular clipping path + // Create a rounded rectangle clipping path + const int radius = size / 8; // Adjust this value to control roundness (size/8 gives subtle rounding) QPainterPath path; - path.addEllipse(0, 0, size, size); + path.addRoundedRect(0, 0, size, size, radius, radius); painter.setClipPath(path); // Draw the scaled pixmap