diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-14 06:30:55 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-14 06:30:55 +0000 |
commit | e6a158bb43e6727c621b36d823cf58cdd90f6e66 (patch) | |
tree | c5a2de68c873599ca4eb86b8ffecdffa1d33bbe6 | |
parent | 05ce0dbd6c6b1e688e2196899f70e35906e2d3fe (diff) | |
download | fpGUI-e6a158bb43e6727c621b36d823cf58cdd90f6e66.tar.xz |
* Fixed minor selection rectangle painting bug in TfpgTreeview.
-rw-r--r-- | src/gui/gui_tree.pas | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/gui_tree.pas b/src/gui/gui_tree.pas index b0f68e19..c9a9a2b4 100644 --- a/src/gui/gui_tree.pas +++ b/src/gui/gui_tree.pas @@ -853,7 +853,9 @@ begin AImage := ImageList.Item[ANode.ImageIndex]; if AImage <> nil then result := result + AImage.Image.Width + 2; - end; + end + else if IndentNodeWithNoImage then + result := result + NoImageIndent + 2; end; end; { if/else } end; @@ -1265,13 +1267,12 @@ begin YPos := 0; while h <> nil do begin -//writeln('painting node: ', h.Text); Canvas.SetTextColor(h.ParentTextColor); // lines with + or - w := GetColumnLeft(StepToRoot(h)); ACenterPos := YPos - FYOffset + col + (GetNodeHeight div 2); YPos := YPos + GetNodeHeight; -//writeln(ACenterPos, ' > ', FHScrollbar.Position - GetNodeHeight); + if ACenterPos > (FHScrollbar.Position - GetNodeHeight) then begin if h = Selection then // draw the selection rectangle and text |