Skip to content

Commit 80020d4

Browse files
committed
major ui update
1 parent 3304519 commit 80020d4

7 files changed

Lines changed: 542 additions & 167 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ target_link_libraries(SteamLuaPatcher PRIVATE
9595
Qt6::Gui
9696
Qt6::Widgets
9797
Qt6::Network
98+
dwmapi
9899
)
99100

100101
# Static build configuration

src/gamecard.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
GameCard::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

2120
void 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

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
QString getStyleSheet() {
99
return QString(R"(
1010
QMainWindow {
11-
background: %1;
11+
background: transparent;
1212
}
1313
1414
QWidget {

0 commit comments

Comments
 (0)