mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Added colored borders to badges in achievements dialog
The achievement badges will now have a blue or gold border to identify whether they have been unlocked in softcore or hardcore mode. Similarly, the game badge will have a blue border if all achievements have been unlocked in either mode or a gold border if all achievements have been unlocked in hardcore mode.
This commit is contained in:
@ -119,7 +119,13 @@ void AchievementHeaderWidget::UpdateData()
|
||||
m_game_icon->setPixmap(QPixmap::fromImage(i_game_icon)
|
||||
.scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||
m_game_icon->adjustSize();
|
||||
m_game_icon->setStyleSheet(QStringLiteral("border: 4px solid transparent"));
|
||||
std::string_view color = AchievementManager::GRAY;
|
||||
if (point_spread.hard_unlocks == point_spread.total_count)
|
||||
color = AchievementManager::GOLD;
|
||||
else if (point_spread.hard_unlocks + point_spread.soft_unlocks == point_spread.total_count)
|
||||
color = AchievementManager::BLUE;
|
||||
m_game_icon->setStyleSheet(
|
||||
QStringLiteral("border: 4px solid %1").arg(QString::fromStdString(std::string(color))));
|
||||
m_game_icon->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user