fixed crash -> if you dont use :setSize() on sub frames

This commit is contained in:
Robert Jelic
2022-06-06 21:23:50 +02:00
parent 4f3ffc328d
commit b6e2aefb68
4 changed files with 40 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ local function Frame(name, parent)
if (parent ~= nil) then
base.parent = parent
base.width, base.height = parent.w, parent.h
base.width, base.height = parent:getSize()
base.bgColor = theme.FrameBG
base.fgColor = theme.FrameFG
else
@@ -580,6 +580,11 @@ local function Frame(name, parent)
return addObject(obj)
end;
addSwitch = function(self, name)
local obj = Switch(name)
return addObject(obj)
end;
addFrame = function(self, name)
local obj = Frame(name, self)
return addObject(obj)