Add parameter to prevent scrollable decorator from fixing the module width
This commit is contained in:
parent
00c1209f73
commit
c8d5346d81
1 changed files with 4 additions and 1 deletions
|
@ -8,12 +8,15 @@ import uuid
|
|||
|
||||
import bumblebee.store
|
||||
|
||||
_TrueValues = ["true", "t", "yes", "y", "1"]
|
||||
|
||||
def scrollable(func):
|
||||
def wrapper(module, widget):
|
||||
text = func(module, widget)
|
||||
if not text: return text
|
||||
width = widget.get("theme.width", module.parameter("width", 30))
|
||||
widget.set("theme.minwidth", "A"*width)
|
||||
if module.parameter("scrolling.makewide", "true").lower() in _TrueValues:
|
||||
widget.set("theme.minwidth", "A"*width)
|
||||
if len(text) <= width:
|
||||
return text
|
||||
# we need to shorten
|
||||
|
|
Loading…
Reference in a new issue