From 31df408d93c057eaaa3dfae002db64f1430a6447 Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Sat, 18 Dec 2021 20:11:50 +0800 Subject: [PATCH] make timestamp fix sized --- data/core/logview.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/core/logview.lua b/data/core/logview.lua index 9f45a160..90ce564f 100644 --- a/data/core/logview.lua +++ b/data/core/logview.lua @@ -142,6 +142,13 @@ function LogView:draw() x, y, w, lh ) x = x + style.padding.x + + -- timestamps are always 15% of the width + local tw = w * 15 / 100 + local time = os.date(nil, item.time) + common.draw_text(style.font, style.dim, time, "center", x, y, tw, lh) + x = x + tw + style.padding.x + w = w - (x - self:get_content_offset()) if is_expanded(item) then