Support negative inactive_text_alpha values for active-window-only fading

This commit is contained in:
zhaolei
2026-04-09 13:03:04 +08:00
parent 7bb73a3c54
commit 40c2012eeb
5 changed files with 30 additions and 8 deletions

View File

@@ -67,6 +67,10 @@ def unit_float(x: ConvertibleToNumbers) -> float:
return max(0, min(float(x), 1))
def signed_unit_float(x: ConvertibleToNumbers) -> float:
return max(-1, min(float(x), 1))
def number_with_unit(x: str, default_unit: str, *extra_units: str) -> tuple[float, str]:
if (mat := number_unit_pat.match(x)) is not None:
try: