mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Correct bug Windows console
This commit is contained in:
parent
5707d258c0
commit
e67fb54e0e
@ -126,8 +126,6 @@ class WCurseLight(object):
|
|||||||
COLOR_BLUE = colorconsole.terminal.colors["LBLUE"]
|
COLOR_BLUE = colorconsole.terminal.colors["LBLUE"]
|
||||||
COLOR_MAGENTA = colorconsole.terminal.colors["LPURPLE"]
|
COLOR_MAGENTA = colorconsole.terminal.colors["LPURPLE"]
|
||||||
COLOR_BLACK = colorconsole.terminal.colors["BLACK"]
|
COLOR_BLACK = colorconsole.terminal.colors["BLACK"]
|
||||||
COLOR_MAGENTA = colorconsole.terminal.colors["MAGENTA"]
|
|
||||||
COLOR_CYAN = colorconsole.terminal.colors["CYAN"]
|
|
||||||
A_UNDERLINE = 0
|
A_UNDERLINE = 0
|
||||||
A_BOLD = 0
|
A_BOLD = 0
|
||||||
COLOR_PAIRS = 9
|
COLOR_PAIRS = 9
|
||||||
|
@ -89,8 +89,21 @@ class GlancesCurses(object):
|
|||||||
curses.init_pair(6, curses.COLOR_RED, -1)
|
curses.init_pair(6, curses.COLOR_RED, -1)
|
||||||
curses.init_pair(7, curses.COLOR_GREEN, -1)
|
curses.init_pair(7, curses.COLOR_GREEN, -1)
|
||||||
curses.init_pair(8, curses.COLOR_BLUE, -1)
|
curses.init_pair(8, curses.COLOR_BLUE, -1)
|
||||||
|
try:
|
||||||
curses.init_pair(9, curses.COLOR_MAGENTA, -1)
|
curses.init_pair(9, curses.COLOR_MAGENTA, -1)
|
||||||
|
except:
|
||||||
|
if args.theme_white:
|
||||||
|
curses.init_pair(9, curses.COLOR_BLACK, -1)
|
||||||
|
else:
|
||||||
|
curses.init_pair(9, curses.COLOR_WHITE, -1)
|
||||||
|
try:
|
||||||
curses.init_pair(10, curses.COLOR_CYAN, -1)
|
curses.init_pair(10, curses.COLOR_CYAN, -1)
|
||||||
|
except:
|
||||||
|
if args.theme_white:
|
||||||
|
curses.init_pair(10, curses.COLOR_BLACK, -1)
|
||||||
|
else:
|
||||||
|
curses.init_pair(10, curses.COLOR_WHITE, -1)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.hascolors = False
|
self.hascolors = False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user