diff options
-rwxr-xr-x | README.md | 2 | ||||
-rwxr-xr-x | src/yuzu/multiplayer/lobby_p.h | 13 |
2 files changed, 11 insertions, 4 deletions
@@ -1,7 +1,7 @@ | |||
1 | yuzu emulator early access | 1 | yuzu emulator early access |
2 | ============= | 2 | ============= |
3 | 3 | ||
4 | This is the source code for early-access 4126. | 4 | This is the source code for early-access 4127. |
5 | 5 | ||
6 | ## Legal Notice | 6 | ## Legal Notice |
7 | 7 | ||
diff --git a/src/yuzu/multiplayer/lobby_p.h b/src/yuzu/multiplayer/lobby_p.h index ace6a5a9b..f1caac383 100755 --- 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)? |