mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-04-03 20:36:37 +00:00
fix intended player count color in dark themes
This commit is contained in:
parent
a2f23746c2
commit
62578c8639
@ -202,12 +202,26 @@ public:
|
||||
case Qt::ForegroundRole: {
|
||||
auto members = data(MemberListRole).toList();
|
||||
auto max_players = data(MaxPlayerRole).toInt();
|
||||
if (members.size() >= max_players) {
|
||||
return QBrush(QColor(255, 48, 32));
|
||||
} else if (members.size() == (max_players - 1)) {
|
||||
return QBrush(QColor(255, 140, 32));
|
||||
} else if (members.size() == 0) {
|
||||
return QBrush(QColor(128, 128, 128));
|
||||
|
||||
if (QIcon::themeName().contains(QStringLiteral("dark")) ||
|
||||
QIcon::themeName().contains(QStringLiteral("midnight"))) {
|
||||
if (members.size() >= max_players) {
|
||||
return QBrush(QColor(255, 48, 32));
|
||||
} else if (members.size() == (max_players - 1)) {
|
||||
return QBrush(QColor(255, 140, 32));
|
||||
} else if (members.size() == 0) {
|
||||
return QBrush(QColor(128, 128, 128));
|
||||
} else if (members.size() > 0 && members.size() < max_players - 1) {
|
||||
return QBrush(QColor(204, 204, 204));
|
||||
}
|
||||
} else {
|
||||
if (members.size() >= max_players) {
|
||||
return QBrush(QColor(255, 48, 32));
|
||||
} else if (members.size() == (max_players - 1)) {
|
||||
return QBrush(QColor(255, 140, 32));
|
||||
} else if (members.size() == 0) {
|
||||
return QBrush(QColor(128, 128, 128));
|
||||
}
|
||||
}
|
||||
// FIXME: How to return a value that tells Qt not to modify the
|
||||
// text color from the default (as if Qt::ForegroundRole wasn't overridden)?
|
||||
|
Loading…
Reference in New Issue
Block a user