From 2f65d5a26ff7a3da24ef37e4f312c3d665b70c4c Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Wed, 22 Dec 2021 10:53:53 +0800 Subject: [PATCH] make the date field consistent --- data/core/logview.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/core/logview.lua b/data/core/logview.lua index 99ab0a93..aa1ad84a 100644 --- a/data/core/logview.lua +++ b/data/core/logview.lua @@ -140,7 +140,8 @@ local function draw_text_multiline(font, text, x, y, color) return resx, y end - +-- this is just to get a date string that's consistent +local datestr = os.date() function LogView:draw() self:draw_background(style.background) @@ -151,7 +152,7 @@ function LogView:draw() style.icon_font:get_width(style.log.INFO.icon) ) - local tw = style.font:get_width(os.date()) + local tw = style.font:get_width(datestr) for _, item, x, y, w, h in self:each_item() do core.push_clip_rect(x, y, w, h) x = x + style.padding.x