diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-15 10:51:23 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-15 10:51:23 +0000 |
commit | 6cfa87f0908b4bdc71d42cd8b17ab3ee82f27b18 (patch) | |
tree | f3f1910c9b9584b8d89a69c0ef5d3f0f846db73f /src | |
parent | 72fd359020d8a29ca92096b1ecc1ac7421b723dc (diff) | |
download | fpGUI-6cfa87f0908b4bdc71d42cd8b17ab3ee82f27b18.tar.xz |
* GUI Test Runner: Improved the images in the treeview.
* GUI Test Runner: Progress bar is now activated as tests run.
* Treeview: Fixed the horizontal scrolling bug where nodes disappear.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/gui_tree.pas | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/gui_tree.pas b/src/gui/gui_tree.pas index 25d8c839..2beb35de 100644 --- a/src/gui/gui_tree.pas +++ b/src/gui/gui_tree.pas @@ -1257,7 +1257,7 @@ var YPos: integer; col: integer; ACenterPos: integer; - x, + x: integer; y: integer; AImageItem: TfpgImageItem; AVisibleHeight: integer; @@ -1325,9 +1325,12 @@ begin w := GetColumnLeft(StepToRoot(h)); ACenterPos := YPos - FYOffset + col + (GetNodeHeight div 2); YPos := YPos + GetNodeHeight; + i := GetColumnLeft(StepToRoot(h)) + GetNodeWidth(h); - if ACenterPos > (FHScrollbar.Position - GetNodeHeight) then + // only paint the node if it is fully visible + if i > FXOffset then begin +// writeln('painting node: ', h.Text); if h = Selection then // draw the selection rectangle and text begin if Focused then @@ -1516,7 +1519,7 @@ begin end; break; //==> end; - end; + end; { while h <> nil } Canvas.EndDraw; end; |