[modules/cpu2] Update to latest API

This commit is contained in:
tobi-wan-kenobi 2020-04-26 10:33:41 +02:00
parent b34178ee71
commit cfa1a5c896
5 changed files with 63 additions and 53 deletions

View file

@ -49,6 +49,9 @@ class Theme(object):
def keywords(self):
return self.__keywords
def color(self, name, default=None):
return self.keywords().get(name, default)
def load(self, name, subdir=''):
if isinstance(name, dict): return name # support plain data
for path in PATHS: