diff --git a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h index 938e8db1d3..43f9d1e0c8 100644 --- a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h +++ b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h @@ -195,19 +195,18 @@ public: void paint (Graphics& g) override { g.setColour (Colours::black); - paintIcon (g); - int rightEdge = getWidth(); + Rectangle bounds (getLocalBounds()); - if (Component* c = buttons.getFirst()) - rightEdge = c->getX(); + const int border = 5; + bounds.removeFromLeft (border); - item.paintContent (g, Rectangle (item.textX, 0, rightEdge - item.textX, getHeight())); - } + item.paintIcon (g, bounds.removeFromLeft (15)); - void paintIcon (Graphics& g) - { - item.paintIcon (g, Rectangle (getHeight(), getHeight())); + bounds.removeFromLeft (border); + bounds.removeFromRight (border); + + item.paintContent (g, bounds); } void resized() override