Fix btnNext left-pad

This commit is contained in:
Gabriel Tofvesson 2024-10-08 19:32:43 +02:00
parent 5fe73663b9
commit 4005b937ee

View File

@ -113,17 +113,21 @@ local function itemList(groups, wBudget, hBudget, savedState, onClick, setPage,
end
}
local padImport = Padding:new{
left = math.floor((wBudget - btnPrev:getWidth() - btnNext:getWidth() - btnImport:getWidth())/2),
element = btnImport
}
local padNext = Padding:new{
left = wBudget - btnPrev:getWidth() - padImport:getWidth() - btnNext:getWidth(),
element = btnNext
}
local tabLine = List:new{
children = {
btnPrev,
Padding:new{
left = math.floor((wBudget - btnPrev:getWidth() - btnNext:getWidth() - btnImport:getWidth())/2),
element = btnImport
},
Padding:new{
left = wBudget - btnPrev:getWidth() - btnImport:getWidth() - btnNext:getWidth(),
element = btnNext
}
padImport,
padNext
},
vertical = false
}
@ -247,7 +251,7 @@ local PAGES = {
print("Importing...")
-- Safely handle transfers, priming computer for a full reset/rescan in case server stops mid-transaction
state:itemTransaction(function()
for _,nodeStack in state.node:find(function(s) return not s:isEmpty() end) do
for _,nodeStack in ipairs(state.node:find(function(s) return not s:isEmpty() end)) do
if not state.controller:insertStack(nodeStack) then
print("Couldn't find a free slot for: "..(nodeStack:getDisplayName() or nodeStack:getName() or "[EMPTY]"))
end