summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-15 10:51:23 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-15 10:51:23 +0000
commit6cfa87f0908b4bdc71d42cd8b17ab3ee82f27b18 (patch)
treef3f1910c9b9584b8d89a69c0ef5d3f0f846db73f /src/gui
parent72fd359020d8a29ca92096b1ecc1ac7421b723dc (diff)
downloadfpGUI-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/gui')
-rw-r--r--src/gui/gui_tree.pas9
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;