mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Adjust columnlist row colors when calling columnlistarea:RedoLayout()
This commit is contained in:
parent
8db876d3a8
commit
0c041d7e0a
@ -264,6 +264,7 @@ function newobject:RedoLayout()
|
|||||||
local display = self.display
|
local display = self.display
|
||||||
|
|
||||||
if #children > 0 then
|
if #children > 0 then
|
||||||
|
self.rowcolorindex = 1
|
||||||
for k, v in ipairs(children) do
|
for k, v in ipairs(children) do
|
||||||
local height = v.height
|
local height = v.height
|
||||||
v.staticx = startx
|
v.staticx = startx
|
||||||
@ -277,6 +278,12 @@ function newobject:RedoLayout()
|
|||||||
end
|
end
|
||||||
starty = starty + v.height
|
starty = starty + v.height
|
||||||
v.lastheight = v.height
|
v.lastheight = v.height
|
||||||
|
v.colorindex = self.rowcolorindex
|
||||||
|
if self.rowcolorindex == self.rowcolorindexmax then
|
||||||
|
self.rowcolorindex = 1
|
||||||
|
else
|
||||||
|
self.rowcolorindex = self.rowcolorindex + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user