decrease font size in 1px increments instead of 2px when fitting host/service names to the screen
This commit is contained in:
parent
b079462c4c
commit
4c11394a98
1 changed files with 2 additions and 2 deletions
4
node.lua
4
node.lua
|
@ -68,10 +68,10 @@ function node.render()
|
||||||
svc_size = CONFIG.header_size
|
svc_size = CONFIG.header_size
|
||||||
|
|
||||||
while CONFIG.header_font:width(serv.host, host_size) > real_width/2-20 do
|
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
|
end
|
||||||
while CONFIG.header_font:width(serv.service, svc_size) > real_width/2-50 do
|
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
|
end
|
||||||
|
|
||||||
margin = math.min(CONFIG.output_size, 20)
|
margin = math.min(CONFIG.output_size, 20)
|
||||||
|
|
Loading…
Reference in a new issue