[themes] Cycle handling bugfix

Cycling was accidentially more important than the individual widget
themes.
This commit is contained in:
Tobias Witek 2016-10-31 11:05:54 +01:00
parent 00c92cb9e3
commit 23617fbdb7

View file

@ -1,8 +1,6 @@
import os
import json
class Theme:
_cycle_index = 0
_cycle = None
@ -22,10 +20,9 @@ class Theme:
value = getattr(obj, key)() if hasattr(obj, key) else None
value = self._defaults.get(key, value)
value = module_theme.get(key, value)
if len(self._cycle) > 0:
value = self._defaults["cycle"][self._cycle_index].get(key, value)
value = module_theme.get(key, value)
if hasattr(obj, "state"):
state = getattr(obj, "state")()