From 1fa400cd3808ec21694d9218bb8a6fa5a05db4e7 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 10 Feb 2024 04:04:31 +0100 Subject: [PATCH] early-access version 4127 --- README.md | 2 +- src/yuzu/multiplayer/lobby_p.h | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 14c8e422e..6e89e5105 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 4126. +This is the source code for early-access 4127. ## Legal Notice 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: case Qt::ForegroundRole: { auto members = data(MemberListRole).toList(); auto max_players = data(MaxPlayerRole).toInt(); + const QColor room_full_color(255, 48, 32); + const QColor room_almost_full_color(255, 140, 32); + const QColor room_has_players_color(32, 160, 32); + const QColor room_empty_color(128, 128, 128); + if (members.size() >= max_players) { - return QBrush(QColor(255, 48, 32)); + return QBrush(room_full_color); } else if (members.size() == (max_players - 1)) { - return QBrush(QColor(255, 140, 32)); + return QBrush(room_almost_full_color); } else if (members.size() == 0) { - return QBrush(QColor(128, 128, 128)); + return QBrush(room_empty_color); + } else if (members.size() > 0 && members.size() < (max_players - 1)) { + return QBrush(room_has_players_color); } // 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)?