1212GameCard::GameCard (QWidget* parent)
1313 : QWidget(parent)
1414{
15- setMinimumSize ( 160 , 240 );
15+ setFixedSize ( 170 , 256 );
1616 setCursor (Qt::PointingHandCursor);
1717 setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
18- setFixedSize (160 , 240 );
1918}
2019
2120void GameCard::setGameData (const QMap<QString, QString>& data) {
@@ -125,7 +124,7 @@ void GameCard::paintEvent(QPaintEvent* event) {
125124 painter.setRenderHint (QPainter::SmoothPixmapTransform);
126125
127126 QRectF cardRect = QRectF (rect ()).adjusted (4 , 4 , -4 , -4 );
128- int radius = 20 ; // Liquid glass soft corners
127+ int radius = 8 ; // User requested sharp corners
129128 bool supported = (m_data.value (" supported" ) == " true" );
130129
131130 // ── Outer Glow ──
@@ -214,8 +213,12 @@ void GameCard::paintEvent(QPaintEvent* event) {
214213 }
215214
216215 if (m_hasThumbnail) {
217- // Stretch thumbnail to fill card
218- painter.drawPixmap (cardRect.toRect (), m_thumbnail);
216+ // Scale proportionally to fill completely, then center-crop the excess
217+ QSize cardSize = cardRect.size ().toSize ();
218+ QPixmap scaled = m_thumbnail.scaled (cardSize, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
219+ int sx = (scaled.width () - cardSize.width ()) / 2 ;
220+ int sy = (scaled.height () - cardSize.height ()) / 2 ;
221+ painter.drawPixmap (cardRect.toRect (), scaled, QRect (sx, sy, cardSize.width (), cardSize.height ()));
219222 } else {
220223 // Material surface container background
221224 QColor surfaceColor = Colors::toQColor (Colors::SURFACE_CONTAINER_HIGH);
@@ -239,7 +242,7 @@ void GameCard::paintEvent(QPaintEvent* event) {
239242 }
240243
241244 // ── Bottom info area ──
242- int infoHeight = 62 ;
245+ int infoHeight = 60 ;
243246 QRectF infoRect (cardRect.left (), cardRect.bottom () - infoHeight,
244247 cardRect.width (), infoHeight);
245248
@@ -328,7 +331,7 @@ void GameCard::paintEvent(QPaintEvent* event) {
328331 // Material container background
329332 QColor badgeColor = Colors::toQColor (Colors::ACCENT_GREEN);
330333 QPainterPath badgePath;
331- badgePath.addRoundedRect (badgeRect, 12 , 12 );
334+ badgePath.addRoundedRect (badgeRect, 6 , 6 ); // Reduced from 12 for sharper corners
332335 painter.fillPath (badgePath, badgeColor);
333336
334337 // Check icon
0 commit comments