[core] Make error widget scrollable

Restrict error module to 15 characters and make it scrollable.
This commit is contained in:
Tobias Witek 2020-02-23 14:47:47 +01:00
parent a69e058dd1
commit 65186baea6
4 changed files with 8 additions and 4 deletions

View file

@ -3,6 +3,7 @@ import logging
import core.input
import core.widget
import core.decorators
log = logging.getLogger(__name__)
@ -47,7 +48,10 @@ class Error(Module):
self._module = module
self._error = error
def full_text(self):
self.widgets()[0].set('theme.width', 15)
@core.decorators.scrollable
def full_text(self, widget):
return '{}: {}'.format(self._module, self._error)
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4