From f820cbfc0e67e6bbd884ed51e6c9154e415dd0a7 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Fri, 25 May 2018 12:50:24 +0200 Subject: [PATCH] Update attributeManager.py --- .../core/attributeManager.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/fenrirscreenreader/core/attributeManager.py b/src/fenrirscreenreader/core/attributeManager.py index 23737bc1..f9dc0b53 100644 --- a/src/fenrirscreenreader/core/attributeManager.py +++ b/src/fenrirscreenreader/core/attributeManager.py @@ -13,6 +13,44 @@ class attributeManager(): self.env = environment def shutdown(self): pass + charAttrib = ( + 'white', # fg + 'black', # bg + False, # bold + False, # italics + False, # underscore + False, # strikethrough + False, # reverse + False, # blink + 'default', # fontsize + 'default') # fontfamily + def isDefaultAttribute(attribute): + defaultAttributes = [] + defaultAttributes.append(( + 'white', # fg + 'black', # bg + False, # bold + False, # italics + False, # underscore + False, # strikethrough + False, # reverse + False, # blink + 'default', # fontsize + 'default' # fontfamily + )) #end attribute + defaultAttributes.append(( + 'default', # fg + 'default', # bg + False, # bold + False, # italics + False, # underscore + False, # strikethrough + False, # reverse + False, # blink + 'default', # fontsize + 'default' # fontfamily + )) #end attribute + return attribute in defaultAttributes def formatAttributes(self, attribute, attributeFormatString = None): if not attributeFormatString: attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString')