`LogView`: Don't draw invisible items

This commit is contained in:
Guldoman 2022-07-01 05:26:07 +02:00
parent 79dd8779c4
commit caf106be1d
No known key found for this signature in database
GPG Key ID: EA928C8BDA1A8825
1 changed files with 32 additions and 30 deletions

View File

@ -154,6 +154,7 @@ function LogView:draw()
local tw = style.font:get_width(datestr) local tw = style.font:get_width(datestr)
for _, item, x, y, w, h in self:each_item() do for _, item, x, y, w, h in self:each_item() do
if y + h >= self.position.y and y <= self.position.y + self.size.y then
core.push_clip_rect(x, y, w, h) core.push_clip_rect(x, y, w, h)
x = x + style.padding.x x = x + style.padding.x
@ -193,6 +194,7 @@ function LogView:draw()
core.pop_clip_rect() core.pop_clip_rect()
end end
end
end end