display ack image at the end of the line, not at the front
This commit is contained in:
parent
1ada00b323
commit
55ae3fe2dd
1 changed files with 7 additions and 5 deletions
12
node.lua
12
node.lua
|
@ -95,20 +95,22 @@ function node.render()
|
||||||
y = y + margin
|
y = y + margin
|
||||||
|
|
||||||
local service_x = real_width - margin - CONFIG.header_font:width(serv.service, service_font_size)
|
local service_x = real_width - margin - CONFIG.header_font:width(serv.service, service_font_size)
|
||||||
local host_x = margin
|
|
||||||
|
|
||||||
if serv.ack then
|
if serv.ack then
|
||||||
ack_image:draw(host_x, y, host_x + host_font_size, y + host_font_size)
|
ack_image:draw(
|
||||||
host_x = host_x + host_font_size + margin
|
real_width - margin - service_font_size, y,
|
||||||
|
real_width - margin, y + service_font_size
|
||||||
|
)
|
||||||
|
service_x = service_x - service_font_size - margin
|
||||||
end
|
end
|
||||||
|
|
||||||
if host_width + service_width > header_width then
|
if host_width + service_width > header_width then
|
||||||
CONFIG.header_font:write(host_x, y, serv.host, host_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][2],1)
|
CONFIG.header_font:write(margin, y, serv.host, host_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][2],1)
|
||||||
y = y + host_font_size + margin
|
y = y + host_font_size + margin
|
||||||
CONFIG.header_font:write(service_x, y, serv.service, service_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][3],1)
|
CONFIG.header_font:write(service_x, y, serv.service, service_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][3],1)
|
||||||
y = y + service_font_size + margin
|
y = y + service_font_size + margin
|
||||||
else
|
else
|
||||||
CONFIG.header_font:write(host_x, y, serv.host, host_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][2],1)
|
CONFIG.header_font:write(margin, y, serv.host, host_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][2],1)
|
||||||
CONFIG.header_font:write(service_x, y, serv.service, service_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][3],1)
|
CONFIG.header_font:write(service_x, y, serv.service, service_font_size, c_text[serv.state][1],c_text[serv.state][2],c_text[serv.state][3],1)
|
||||||
y = y + CONFIG.header_size + margin
|
y = y + CONFIG.header_size + margin
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue