diff options
author | Kevnkkm <kevin.zarpoush@gmail.com> | 2024-02-10 01:45:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 01:45:11 +0100 |
commit | fe6934593fd7e7b6c61d1fb84d0794d19f024b47 (patch) | |
tree | b3a890d81fe4c9ce94cc42126f56a8e8fa50437e /src | |
parent | Merge pull request #12951 from liamwhite/more-ipc (diff) | |
download | yuzu-fe6934593fd7e7b6c61d1fb84d0794d19f024b47.tar yuzu-fe6934593fd7e7b6c61d1fb84d0794d19f024b47.tar.gz yuzu-fe6934593fd7e7b6c61d1fb84d0794d19f024b47.tar.bz2 yuzu-fe6934593fd7e7b6c61d1fb84d0794d19f024b47.tar.lz yuzu-fe6934593fd7e7b6c61d1fb84d0794d19f024b47.tar.xz yuzu-fe6934593fd7e7b6c61d1fb84d0794d19f024b47.tar.zst yuzu-fe6934593fd7e7b6c61d1fb84d0794d19f024b47.zip |
Diffstat (limited to 'src')
-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: 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)? |