TreeViewItem and setDrawsInLeftMargin

Hi Jules,

I would like your input on the following problem whether or not it’s a bug in Juce.

I got some selectable TreeViewItem where I would like to set DrawsInLeftMargin to true for visual purposes.
Those TreeViewItem have an alternate background color(a la iTunes) and can be selected with an highlighted color so it looks better with DrawsInLeftMargin.
Problem is, with the current implementation, the little arrow and line that signify if an item can be opened is hidden by the selection color if I use a colored filled rect.

Don’t we need a way to draw back those on top of the selection ?


Interesting point… I guess it would be better if it was drawn in the opposite order, rendering the open/close buttons after the item has painted itself. I can’t think of any problems with that, and I think it’s just a case of rearranging the order inside TreeViewItem::paintRecursively()

I’m fine with that.


Works perfectly now.