diff options
| -rw-r--r-- | src/yuzu/multiplayer/lobby_p.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/yuzu/multiplayer/lobby_p.h b/src/yuzu/multiplayer/lobby_p.h index 398833e7a..77ec1fcde 100644 --- a/src/yuzu/multiplayer/lobby_p.h +++ b/src/yuzu/multiplayer/lobby_p.h | |||
| @@ -202,12 +202,19 @@ public: | |||
| 202 | case Qt::ForegroundRole: { | 202 | case Qt::ForegroundRole: { |
| 203 | auto members = data(MemberListRole).toList(); | 203 | auto members = data(MemberListRole).toList(); |
| 204 | auto max_players = data(MaxPlayerRole).toInt(); | 204 | auto max_players = data(MaxPlayerRole).toInt(); |
| 205 | const QColor room_full_color(255, 48, 32); | ||
| 206 | const QColor room_almost_full_color(255, 140, 32); | ||
| 207 | const QColor room_has_players_color(32, 160, 32); | ||
| 208 | const QColor room_empty_color(128, 128, 128); | ||
| 209 | |||
| 205 | if (members.size() >= max_players) { | 210 | if (members.size() >= max_players) { |
| 206 | return QBrush(QColor(255, 48, 32)); | 211 | return QBrush(room_full_color); |
| 207 | } else if (members.size() == (max_players - 1)) { | 212 | } else if (members.size() == (max_players - 1)) { |
| 208 | return QBrush(QColor(255, 140, 32)); | 213 | return QBrush(room_almost_full_color); |
| 209 | } else if (members.size() == 0) { | 214 | } else if (members.size() == 0) { |
| 210 | return QBrush(QColor(128, 128, 128)); | 215 | return QBrush(room_empty_color); |
| 216 | } else if (members.size() > 0 && members.size() < (max_players - 1)) { | ||
| 217 | return QBrush(room_has_players_color); | ||
| 211 | } | 218 | } |
| 212 | // FIXME: How to return a value that tells Qt not to modify the | 219 | // FIXME: How to return a value that tells Qt not to modify the |
| 213 | // text color from the default (as if Qt::ForegroundRole wasn't overridden)? | 220 | // text color from the default (as if Qt::ForegroundRole wasn't overridden)? |