[core] Minor refactoring

Use a small helper function from util, tidy up some parts of the
output.
This commit is contained in:
Tobi-wan Kenobi 2016-12-02 17:52:05 +01:00
parent a93fa4aa5c
commit f306366629
4 changed files with 18 additions and 23 deletions

View file

@ -51,10 +51,6 @@ class Output(bumblebee.output.Output):
"separator_block_width": 0,
})
sep = theme.default_separators(widget)
sep = sep if sep else False
width = theme.separator_block_width(widget)
width = width if width else 0
self._data.append({
u"full_text": " {} {} {}".format(
theme.prefix(widget),
@ -65,8 +61,8 @@ class Output(bumblebee.output.Output):
"background": theme.background(widget),
"name": widget.module(),
"instance": widget.instance(),
"separator": sep,
"separator_block_width": width,
"separator": theme.default_separators(widget, False),
"separator_block_width": theme.separator_block_width(widget, 0),
})
theme.next_widget()