Yes, that index value has a different meaning - it's the index of the item in the DirectoryContentsList, not the row of the tree (where the index will obviously depend on which folders are open).
To get the row of the tree would be pretty difficult in that method, because it's called by lists as well as treeviews, so doing anything treeview-specific in it would be a bit dodgy. Not sure what to suggest, it depends on what you're actually trying to achieve.
My goal is just to paint a opened folder icon when it is actually open in the tree view just like I already did in a nasty way here.
So the not-so-nasty way of doing it would be subclassing FileTreeComponent and FileListTreeItem in order to overload LnF drawFileBrowserRow method with some bool isOpen parameter.
I'll leave it the nasty way for a while since this is only a small detail on a gui.
So the not-so-nasty way of doing it would be subclassing FileTreeComponent and FileListTreeItem in order to overload LnF drawFileBrowserRow method with some bool isOpen parameter.
Well, I could, but that method isn't only used for treeviews. it's also used for plain lists, so an isOpen parameter would be superfluous in almost all cases.