Skip to content

Commit

Permalink
Fixed color picker for chat
Browse files Browse the repository at this point in the history
  • Loading branch information
nickolaj-jepsen committed Jan 27, 2016
1 parent 67c063d commit 0f8aaf4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cue_csgo/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def __init__(self, parent=None):
self.background_button_ct_color.clicked.connect(self.ct_color_picker)
self.background_button_t_color.clicked.connect(self.t_color_picker)

self.chat_button_color.clicked.connect(self.chat_color_picker)

self.button_save_settings.clicked.connect(self.set_settings)
self.button_cancel_settings.clicked.connect(self.hide)

Expand Down Expand Up @@ -170,6 +172,12 @@ def t_color_picker(self):
self.background_button_t_color.setStyleSheet("background-color: {}" .format(color.name()))
self.background_line_edit_t_color.setText(color.name().upper())

def chat_color_picker(self):
color = QColorDialog.getColor()
if color != QColor():
self.chat_button_color.setStyleSheet("background-color: {}" .format(color.name()))
self.chat_line_edit_color.setText(color.name().upper())


def start_app():
app = QApplication(sys.argv)
Expand Down

0 comments on commit 0f8aaf4

Please sign in to comment.