Browse Source

Add colors to labels

master
Noëlle Anthony 4 years ago
parent
commit
94ae9d7f7e
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      main.py

+ 2
- 1
main.py View File

@@ -11,12 +11,13 @@ class TextLine:
self.username = username
self.color = "#000000" if color == "" else color
self.qcolor = QColor(int(self.color[1:3], 16), int(self.color[3:5], 16), int(self.color[5:7], 16))
self.label = qt.QLabel("&{}:".format(username))
self.label = qt.QLabel("<span style='color: {}'>&{}:</span>".format(self.color, self.username))
self.message = qt.QPlainTextEdit()
self.message.keyPressEvent = self.isItEnter
self.message.setMaximumSize(600, 40)
self.textarea = textarea
self.label.setBuddy(self.message)
self.label
self.timestamp = timestamp
self.logfile = logfile

Loading…
Cancel
Save