make timestamp fix sized

This commit is contained in:
takase1121 2021-12-18 20:11:50 +08:00
parent fd3b4334ce
commit 31df408d93
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 7 additions and 0 deletions

View File

@ -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