fix colors
This commit is contained in:
@ -35,8 +35,8 @@ class driver():
|
||||
self.vcsaDevicePath = '/dev/vcsa'
|
||||
self.ListSessions = None
|
||||
self.charmap = {}
|
||||
self.bgColorNames = {0: _('black'), 1: _('blue'), 2: _('green'), 3: _('cyan'), 4: _('red'), 5: _('purple'), 6: _('brown/yellow'), 7: _('white')}
|
||||
self.fgColorNames = {8: _('black'), 9: _('blue'), 10: _('green'), 11: _('cyan'), 12: _('red'), 13: _('purple'), 14: _('brown/yellow'), 15: _('white')}
|
||||
self.bgColorNames = {0: _('black'), 1: _('blue'), 2: _('green'), 3: _('cyan'), 4: _('red'), 5: _('Magenta'), 6: _('brown/yellow'), 7: _('white')}
|
||||
self.fgColorNames = {0: _('Black'), 1: _('Blue'), 2: _('Green'), 3: _('Cyan'), 4: _('Red'), 5: _('Magenta'), 6: _('brown/yellow'), 7: _('Light gray'), 8: _('Dark gray'), 9: _('Light blue'), 10: ('Light green'), 11: _('Light cyan'), 12: _('Light red'), 13: _('Light magenta'), 14: _('Light yellow'), 15: _('White')}
|
||||
self.hichar = None
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
@ -222,11 +222,11 @@ class driver():
|
||||
ink = attr & 0x0F
|
||||
paper = (attr>>4) & 0x0F
|
||||
blink = 0
|
||||
#if attr & 1:
|
||||
# blink = 1
|
||||
if attr & 1:
|
||||
blink = 1
|
||||
bold = 0
|
||||
#if attr & 16:
|
||||
# bold = 1
|
||||
if attr & 16:
|
||||
bold = 1
|
||||
#if (ink != 7) or (paper != 0):
|
||||
# print(ink,paper)
|
||||
if sh & self.hichar:
|
||||
@ -240,15 +240,15 @@ class driver():
|
||||
allAttrib += lineAttrib
|
||||
return str(allText), allAttrib
|
||||
def getFenrirBGColor(self, attribute):
|
||||
print(attribute[2])
|
||||
try:
|
||||
return self.bgColorNames[attribute[2]]
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return ''
|
||||
def getFenrirFGColor(self, attribute):
|
||||
try:
|
||||
return self.fgColorNames[attribute[1]]
|
||||
except:
|
||||
except Exception as e:
|
||||
return ''
|
||||
def getFenrirUnderline(self, attribute):
|
||||
if attribute[5] == 1:
|
||||
@ -263,9 +263,9 @@ class driver():
|
||||
return _('blink')
|
||||
return ''
|
||||
def getFenrirFont(self, attribute):
|
||||
return _('System Font')
|
||||
return _('')
|
||||
def getFenrirFontSize(self, attribute):
|
||||
return _('System Font Size')
|
||||
return _('')
|
||||
def update(self, trigger='onUpdate'):
|
||||
if trigger == 'onInput': # no need for an update on input for VCSA
|
||||
return
|
||||
|
Reference in New Issue
Block a user