mirror of
https://github.com/kepler155c/opus
synced 2024-12-31 19:00:27 +00:00
drop dowm menus resize fix
This commit is contained in:
parent
e1fd4be3a5
commit
e6d1e58ce2
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user