This commit is contained in:
Kovid Goyal 2020-08-30 20:23:55 +05:30
parent ad57467c93
commit 1d607bf13e
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -678,6 +678,8 @@ def window_border_width(x: Union[str, int, float]) -> Tuple[float, str]:
if trailer in ('px', 'pt'):
unit = trailer
val = float(x[:-2])
else:
val = float(x)
else:
val = float(x)
return max(0, val), unit