Merge branch 'no-colors-on-tty' into 'master'

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

See merge request ynerant/squinnondation!9
This commit is contained in:
ynerant 2021-01-09 18:19:41 +01:00
commit ff781981f9
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)