decrease font size in 1px increments instead of 2px when fitting host/service names to the screen

This commit is contained in:
Franzi 2020-12-31 17:33:38 +01:00
parent b079462c4c
commit 4c11394a98
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -68,10 +68,10 @@ function node.render()
svc_size = CONFIG.header_size
while CONFIG.header_font:width(serv.host, host_size) > real_width/2-20 do
host_size = host_size - 2
host_size = host_size - 1
end
while CONFIG.header_font:width(serv.service, svc_size) > real_width/2-50 do
svc_size = svc_size - 2
svc_size = svc_size - 1
end
margin = math.min(CONFIG.output_size, 20)