From 7ad21c516b1126fd8243c6176dbf43c3e805d7f2 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Mon, 25 Nov 2013 12:06:07 +0100 Subject: [PATCH] Gave nobody a defined color --- game.py | 4 ++-- player.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/game.py b/game.py index 5e3a269..dad4441 100644 --- a/game.py +++ b/game.py @@ -2,7 +2,7 @@ from __future__ import print_function from PySide import QtCore, QtGui -from player import Player +from player import Player, nobodyColor from windows import QuestionWindow, EditAnswersWindow, PlayerStartWindow, VictoryWindow from gamestate import QuestionAnswers @@ -200,7 +200,7 @@ class SeopardyGame(QtGui.QWidget): if not answers.got_answered(): btnstr += "+nobody" - btncolor = QtGui.QColor(128, 128, 128) + btncolor = nobodyColor btn.setStyleSheet("QPushButton { background-color: %s; color: white; font-size: 20px; border: none; }" % (btncolor.name(),)) btn.setText(btnstr.strip()) diff --git a/player.py b/player.py index fa0229c..ff48fb5 100644 --- a/player.py +++ b/player.py @@ -60,3 +60,5 @@ class ButtonEvent(QtCore.QEvent): def get_playerno(self): return self.playerno + +nobodyColor = QtGui.QColor(128, 128, 128)