mirror of
https://github.com/kepler155c/opus
synced 2025-01-03 20:30:28 +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,
|
backgroundColor = colors.white,
|
||||||
buttonClass = 'DropMenuItem',
|
buttonClass = 'DropMenuItem',
|
||||||
}
|
}
|
||||||
function UI.DropMenu:setParent()
|
function UI.DropMenu:layout()
|
||||||
UI.MenuBar.setParent(self)
|
UI.MenuBar.layout(self)
|
||||||
|
|
||||||
local maxWidth = 1
|
local maxWidth = 1
|
||||||
for y,child in ipairs(self.children) do
|
for y,child in ipairs(self.children) do
|
||||||
@ -31,9 +31,12 @@ function UI.DropMenu:setParent()
|
|||||||
|
|
||||||
self.height = #self.children + 1
|
self.height = #self.children + 1
|
||||||
self.width = maxWidth + 2
|
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
|
end
|
||||||
|
|
||||||
function UI.DropMenu:enable()
|
function UI.DropMenu:enable()
|
||||||
|
@ -15,8 +15,8 @@ local function getProxy(path)
|
|||||||
end
|
end
|
||||||
|
|
||||||
Event.addRoutine(function()
|
Event.addRoutine(function()
|
||||||
|
print('proxy: listening on port 188')
|
||||||
while true do
|
while true do
|
||||||
print('proxy: listening on port 188')
|
|
||||||
local socket = Socket.server(188)
|
local socket = Socket.server(188)
|
||||||
|
|
||||||
print('proxy: connection from ' .. socket.dhost)
|
print('proxy: connection from ' .. socket.dhost)
|
||||||
|
Loading…
Reference in New Issue
Block a user