1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-26 02:14:22 +00:00

Small changes to Expression, TreeView, FileBasedDocument.

This commit is contained in:
Julian Storer 2010-08-26 10:09:08 +01:00
parent d9e00279cf
commit 34d8bfcf63
12 changed files with 136 additions and 95 deletions

View file

@ -1427,6 +1427,17 @@ void TreeViewItem::paintRecursively (Graphics& g, int width)
const int indent = getIndentX();
const int itemW = itemWidth < 0 ? width - indent : itemWidth;
{
g.saveState();
g.setOrigin (indent, 0);
if (g.reduceClipRegion (drawsInLeftMargin ? -indent : 0, 0,
drawsInLeftMargin ? itemW + indent : itemW, itemHeight))
paintItem (g, itemW, itemHeight);
g.restoreState();
}
g.setColour (ownerView->findColour (TreeView::linesColourId));
const float halfH = itemHeight * 0.5f;
@ -1489,17 +1500,6 @@ void TreeViewItem::paintRecursively (Graphics& g, int width)
}
}
{
g.saveState();
g.setOrigin (indent, 0);
if (g.reduceClipRegion (drawsInLeftMargin ? -indent : 0, 0,
drawsInLeftMargin ? itemW + indent : itemW, itemHeight))
paintItem (g, itemW, itemHeight);
g.restoreState();
}
if (isOpen())
{
const Rectangle<int> clip (g.getClipBounds());