Update attributeManager.py

This commit is contained in:
chrys87 2018-05-25 12:59:10 +02:00 committed by GitHub
parent a541622870
commit 17c6f2cd2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,14 +8,14 @@ from fenrirscreenreader.core import debug
class attributeManager(): class attributeManager():
def __init__(self): def __init__(self):
pass self.setDefaultAttributes()
def initialize(self, environment): def initialize(self, environment):
self.env = environment self.env = environment
def shutdown(self): def shutdown(self):
pass pass
def isDefaultAttribute(attribute): def setDefaultAttributes(self):
defaultAttributes = [] self.defaultAttributes = []
defaultAttributes.append(( self.defaultAttributes.append((
'white', # fg 'white', # fg
'black', # bg 'black', # bg
False, # bold False, # bold
@ -27,7 +27,7 @@ class attributeManager():
'default', # fontsize 'default', # fontsize
'default' # fontfamily 'default' # fontfamily
)) #end attribute )) #end attribute
defaultAttributes.append(( self.defaultAttributes.append((
'default', # fg 'default', # fg
'default', # bg 'default', # bg
False, # bold False, # bold
@ -39,7 +39,8 @@ class attributeManager():
'default', # fontsize 'default', # fontsize
'default' # fontfamily 'default' # fontfamily
)) #end attribute )) #end attribute
return attribute in defaultAttributes def isDefaultAttribute(self,attribute):
return attribute in self.defaultAttributes
def formatAttributes(self, attribute, attributeFormatString = None): def formatAttributes(self, attribute, attributeFormatString = None):
# "black", # "black",
# "red", # "red",