From c8d5346d819d054715797a08f2c9fc018b80b54b Mon Sep 17 00:00:00 2001 From: WORD559 Date: Wed, 2 Oct 2019 21:30:55 +0100 Subject: [PATCH] Add parameter to prevent scrollable decorator from fixing the module width --- bumblebee/output.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bumblebee/output.py b/bumblebee/output.py index 5c6ff92..f70b605 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -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