Fix colors when we can't change colors (eg. in a TTY)

This commit is contained in:
Yohann D'ANELLO 2021-01-09 18:14:48 +01:00
parent 25e502ab45
commit ea5da5656f
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 2 additions and 1063 deletions

File diff suppressed because it is too large Load Diff

View File

@ -120,7 +120,8 @@ class User(Peer):
self.emoji_pad = curses.newpad(18, 12)
self.emoji_panel_page = -1
curses.init_color(curses.COLOR_WHITE, 1000, 1000, 1000)
if curses.can_change_color():
curses.init_color(curses.COLOR_WHITE, 1000, 1000, 1000)
for i in range(curses.COLOR_BLACK + 1, curses.COLOR_WHITE):
curses.init_pair(i + 1, i, curses.COLOR_BLACK)