From 437b93a688b1db9f474b742709af85faca702585 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Fri, 4 Oct 2024 00:58:54 +0200 Subject: [PATCH] Fix List width computation --- gfx/list.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/list.lua b/gfx/list.lua index 00dc096..3172823 100644 --- a/gfx/list.lua +++ b/gfx/list.lua @@ -92,11 +92,11 @@ function List:getHeight() end function List:getWidth() - local h = 0 + local w = 0 for _,v in ipairs(self.children) do - h = h + v:getHeight() + w = w + v:getWidth() end - return h + return w end function List:findById(id)