From 0574e0ab4b59a5676f6243d23b1f271cc9f323c4 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Sun, 13 Oct 2024 00:08:14 +0200 Subject: [PATCH] Fix group list padding issue --- itemcontroller.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)