diff --git a/ishyChat/Client/Views/TkinterView.py b/ishyChat/Client/Views/TkinterView.py index 9a4a88d..a7ac551 100644 --- a/ishyChat/Client/Views/TkinterView.py +++ b/ishyChat/Client/Views/TkinterView.py @@ -287,6 +287,19 @@ def addClient(self, new_name): we can colour their name in the colour we've assigned to them.""" if new_name in self.db: return + + # A little hack to get around 'black' not being + # a standard named tkinter/tk colour. + if 'black' in new_name.lower(): + self.addClient('gray') + colour = self.db['gray'] + self.textbox.tag_delete('client_' + 'gray') + self.textbox.tag_config('client_' + new_name, + foreground = colour) + del self.db['gray'] + self.db[new_name] = colour + return + self.db[new_name] = '' flat_name = new_name.lower()