diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-12-04 09:38:24 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-12-04 09:38:24 +0000 |
commit | acbf9e099e49650f880c37cb97d3f8f532e2bdf1 (patch) | |
tree | d057433bf5f8235534a36154fa61ec0c4b725f7f /src | |
parent | 5c0bf25268f3490934de7e80ad4da5ef0c0f8574 (diff) | |
download | fpGUI-acbf9e099e49650f880c37cb97d3f8f532e2bdf1.tar.xz |
* Minor painting improvement in the treeview nodes.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/gui_tree.pas | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/gui_tree.pas b/src/gui/gui_tree.pas index aef8507d..b1328b14 100644 --- a/src/gui/gui_tree.pas +++ b/src/gui/gui_tree.pas @@ -27,7 +27,7 @@ unit gui_tree; text and data. * Implement event handlers the user can hook into and do custom drawing. - WARNING: This is still under heavy development! Do NOT use yet. + WARNING: This is still under heavy development. Use at own risk! } {.$Define Debug} @@ -1268,12 +1268,23 @@ begin end; { if/else } Canvas.SetLineStyle(1, FTreeLineStyle); - if h.Count > 0 then // subnodes? + if h.Count > 0 then // do we have subnodes? begin + // small horizontal line above rectangle for first subnode (with children) only + if (h <> RootNode.FirstSubNode) then + begin + if (h.Parent.FirstSubNode = h) then + begin + Canvas.SetLineStyle(1, FTreeLineStyle); + Canvas.DrawLine(w - FXOffset - GetColumnWidth(i1) div 2 + 1, ACenterPos - 7, w - FXOffset - GetColumnWidth(i1) div 2 + 1, ACenterPos - 3); + end; + end; + // subnode rectangle around the "+" or "-" Canvas.SetColor(FTreeLineColor); Canvas.SetLineStyle(1, lsSolid); // rectangle is always solid line style Canvas.DrawRectangle(w - FXOffset - GetColumnWidth(i1) div 2 - 3, ACenterPos - 3, 9, 9); + Canvas.SetColor(clText1); if h.Collapsed then |