[core/theme] slight refactoring

This commit is contained in:
tobi-wan-kenobi 2020-04-07 21:00:55 +02:00
parent 32e5d633f4
commit c4762d92f7

View file

@ -88,10 +88,9 @@ class Theme(object):
def get(self, key, widget=None, default=None): def get(self, key, widget=None, default=None):
if not widget: if not widget:
widget = core.widget.Widget('') widget = core.widget.Widget('')
if isinstance(widget, str): # special handling
# special handling if widget == 'previous':
if widget == 'previous': return self.__previous.get(key, None)
return self.__previous.get(key, None)
value = default value = default