Fix group list padding issue

This commit is contained in:
Gabriel Tofvesson 2024-10-13 00:08:14 +02:00
parent 343aa69a46
commit 0574e0ab4b

View File

@ -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)