diff --git a/itemcontroller.lua b/itemcontroller.lua index 3eddd80..ca10626 100644 --- a/itemcontroller.lua +++ b/itemcontroller.lua @@ -611,7 +611,6 @@ local PAGES = { local listEntry = mainList:findById(tostring(i)) listEntry:setVisible(isVisible) if isVisible then - local nameText = listEntry:findById(GroupEntryID.NAME) local namePadding = listEntry:findById(GroupEntryID.PADDING) local countText = listEntry:findById(GroupEntryID.COUNT) @@ -620,9 +619,10 @@ local PAGES = { local nameTextBudget = mainList:getWidth() - countText:getWidth() - 1 local name = fitText(group:getSimpleName(), nameTextBudget) + local padding = mainList:getWidth() - #name - countText:getWidth() nameText:setText(name) - namePadding:setPadding{ right = nameTextBudget - #name + 1 } + namePadding:setPadding{ right = padding } listEntry:_reload() listEntry:setOnClick(function() state:setPage("GROUP_DETAIL", group)