bug(w.l.overflow): Fix iterating widgets

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
This commit is contained in:
Lucas Schwiderski 2021-04-11 22:35:42 +02:00
parent 7cfb69c828
commit c098bc36e8
No known key found for this signature in database
GPG Key ID: AA12679AAA6DF4D8
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ function overflow:fit(context, orig_width, orig_height)
-- First, determine widget sizes.
-- Only when the content doesn't fit and needs scrolling should
-- we reduce content size to make space for a scrollbar.
for _, widget in pairs(widgets) do
for _, widget in ipairs(widgets) do
local w, h = base.fit_widget(self, context, widget, width, height)
if is_y then
@ -191,7 +191,7 @@ function overflow:layout(context, orig_width, orig_height)
end
end
for i, w in pairs(widgets) do
for i, w in ipairs(widgets) do
local content_x, content_y
local content_w, content_h = base.fit_widget(self, context, w, width, height)