[core/themes] Add state themes

Each widget can now return a state using the method "state()". This
string is then used to look up a theme information which is used instead
of the default or module theme, if found.

see #23
This commit is contained in:
Tobi-wan Kenobi 2016-12-09 13:32:22 +01:00
parent 88b36417f8
commit 4baf63f88c
5 changed files with 50 additions and 13 deletions

View file

@ -18,6 +18,9 @@ class Widget(object):
pass in the module name in every concrete module implementation"""
self.module = module.name
def state(self):
return "state-default"
def full_text(self):
"""Retrieve the full text to display in the widget"""
if callable(self._full_text):