Version 2.2 - retro layout + bug fixes

This commit is contained in:
OTCv8
2020-03-31 21:34:09 +02:00
parent 1df9b82846
commit 6b39f061ae
189 changed files with 3384 additions and 4603 deletions

View File

@@ -1,6 +1,4 @@
function init()
g_ui.importStyle('container')
connect(Container, { onOpen = onContainerOpen,
onClose = onContainerClose,
onSizeChange = onContainerChangeSize,
@@ -50,10 +48,18 @@ function refreshContainerItems(container)
end
end
function toggleContainerPages(containerWindow, pages)
containerWindow:getChildById('miniwindowScrollBar'):setMarginTop(pages and 42 or 22)
containerWindow:getChildById('contentsPanel'):setMarginTop(pages and 42 or 22)
containerWindow:getChildById('pagePanel'):setVisible(pages)
function toggleContainerPages(containerWindow, hasPages)
if hasPages == containerWindow.pagePanel:isOn() then
return
end
containerWindow.pagePanel:setOn(hasPages)
if hasPages then
containerWindow.miniwindowScrollBar:setMarginTop(containerWindow.miniwindowScrollBar:getMarginTop() + containerWindow.pagePanel:getHeight())
containerWindow.contentsPanel:setMarginTop(containerWindow.contentsPanel:getMarginTop() + containerWindow.pagePanel:getHeight())
else
containerWindow.miniwindowScrollBar:setMarginTop(containerWindow.miniwindowScrollBar:getMarginTop() - containerWindow.pagePanel:getHeight())
containerWindow.contentsPanel:setMarginTop(containerWindow.contentsPanel:getMarginTop() - containerWindow.pagePanel:getHeight())
end
end
function refreshContainerPages(container)