[engine/output] Use (experimental) custom widget padding
When padding a widget, instead of using the "min_width" field of the i3bar protocol, which seems to "swallow" click events, perform a custom padding by simply extending the right-hand side with spaces. fixes #334
This commit is contained in:
parent
22419b813f
commit
7d55bdce6c
1 changed files with 6 additions and 1 deletions
|
@ -125,13 +125,18 @@ class I3BarOutput(object):
|
||||||
"separator_block_width": self._theme.separator_block_width(widget),
|
"separator_block_width": self._theme.separator_block_width(widget),
|
||||||
})
|
})
|
||||||
width = self._theme.minwidth(widget)
|
width = self._theme.minwidth(widget)
|
||||||
|
|
||||||
|
if width:
|
||||||
|
full_text = full_text.ljust(len(width) + len(prefix) + len(suffix))
|
||||||
|
|
||||||
self._widgets.append({
|
self._widgets.append({
|
||||||
u"full_text": full_text,
|
u"full_text": full_text,
|
||||||
"color": self._theme.fg(widget),
|
"color": self._theme.fg(widget),
|
||||||
"background": self._theme.bg(widget),
|
"background": self._theme.bg(widget),
|
||||||
"separator_block_width": self._theme.separator_block_width(widget),
|
"separator_block_width": self._theme.separator_block_width(widget),
|
||||||
"separator": True if separator is None else False,
|
"separator": True if separator is None else False,
|
||||||
"min_width": width + "A"*(len(prefix) + len(suffix)) if width else None,
|
"min_width": None,
|
||||||
|
# "min_width": width + "A"*(len(prefix) + len(suffix)) if width else None,
|
||||||
"align": self._theme.align(widget),
|
"align": self._theme.align(widget),
|
||||||
"instance": widget.id,
|
"instance": widget.id,
|
||||||
"name": module.id,
|
"name": module.id,
|
||||||
|
|
Loading…
Reference in a new issue