From 4c11394a98887b49a735216ad3add81928ecaf4e Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 31 Dec 2020 17:33:38 +0100 Subject: [PATCH] decrease font size in 1px increments instead of 2px when fitting host/service names to the screen --- node.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node.lua b/node.lua index 4ba360c..c143722 100644 --- a/node.lua +++ b/node.lua @@ -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)