drop dowm menus resize fix

This commit is contained in:
kepler155c@gmail.com 2019-04-14 17:44:29 -04:00
parent e1fd4be3a5
commit e6d1e58ce2
2 changed files with 8 additions and 5 deletions

View File

@ -10,8 +10,8 @@ UI.DropMenu.defaults = {
backgroundColor = colors.white,
buttonClass = 'DropMenuItem',
}
function UI.DropMenu:setParent()
UI.MenuBar.setParent(self)
function UI.DropMenu:layout()
UI.MenuBar.layout(self)
local maxWidth = 1
for y,child in ipairs(self.children) do
@ -31,9 +31,12 @@ function UI.DropMenu:setParent()
self.height = #self.children + 1
self.width = maxWidth + 2
self.ow = self.width
self.canvas = self:addLayer()
if not self.canvas then
self.canvas = self:addLayer()
else
self.canvas:resize(self.width, self.height)
end
end
function UI.DropMenu:enable()

View File

@ -15,8 +15,8 @@ local function getProxy(path)
end
Event.addRoutine(function()
print('proxy: listening on port 188')
while true do
print('proxy: listening on port 188')
local socket = Socket.server(188)
print('proxy: connection from ' .. socket.dhost)