mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
- Chnage some hard-coded colors to take into account their background. (#3654)
- Change some SVGs from black to white if their background is too dark.
This commit is contained in:
parent
7eb2e36740
commit
a522255baf
6 changed files with 36 additions and 10 deletions
|
|
@ -57,9 +57,9 @@ PlayerListWidget::PlayerListWidget(TabSupervisor *_tabSupervisor,
|
|||
readyIcon = QPixmap("theme:icons/ready_start");
|
||||
notReadyIcon = QPixmap("theme:icons/not_ready_start");
|
||||
concededIcon = QPixmap("theme:icons/conceded");
|
||||
playerIcon = QPixmap("theme:icons/player");
|
||||
judgeIcon = QPixmap("theme:icons/scales");
|
||||
spectatorIcon = QPixmap("theme:icons/spectator");
|
||||
playerIcon = loadColorAdjustedPixmap("theme:icons/player");
|
||||
judgeIcon = loadColorAdjustedPixmap("theme:icons/scales");
|
||||
spectatorIcon = loadColorAdjustedPixmap("theme:icons/spectator");
|
||||
lockIcon = QPixmap("theme:icons/lock");
|
||||
|
||||
if (tabSupervisor) {
|
||||
|
|
@ -173,8 +173,13 @@ void PlayerListWidget::setActivePlayer(int playerId)
|
|||
while (i.hasNext()) {
|
||||
i.next();
|
||||
QTreeWidgetItem *twi = i.value();
|
||||
QColor c = i.key() == playerId ? QColor(150, 255, 150) : palette().base().color();
|
||||
twi->setBackground(4, c);
|
||||
if (i.key() == playerId) {
|
||||
twi->setBackground(4, QColor(150, 255, 150));
|
||||
twi->setTextColor(4, QColor(0, 0, 0));
|
||||
} else {
|
||||
twi->setBackground(4, palette().base().color());
|
||||
twi->setTextColor(4, palette().text().color());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue