Qt: Resizing Font Size and Icon Grid Size (#2429)

This commit is contained in:
¥IGA 2025-02-14 11:36:23 +01:00 committed by GitHub
parent 1cc9e0d37f
commit b48975f116
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -117,7 +117,12 @@ void GameGridFrame::PopulateGameGrid(QVector<GameInfo> m_games_search, bool from
layout->addWidget(image_label);
layout->addWidget(name_label);
name_label->setStyleSheet("color: white; font-size: 12px; font-weight: bold;");
// Resizing of font-size.
float fontSize = (Config::getIconSizeGrid() / 5.5f);
QString styleSheet =
QString("color: white; font-weight: bold; font-size: %1px;").arg(fontSize);
name_label->setStyleSheet(styleSheet);
QGraphicsDropShadowEffect* shadowEffect = new QGraphicsDropShadowEffect();
shadowEffect->setBlurRadius(5); // Set the blur radius of the shadow
shadowEffect->setColor(QColor(0, 0, 0, 160)); // Set the color and opacity of the shadow