* Readd the fixes to the header position that were lost after rev 619

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@621 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2008-12-08 01:36:47 +00:00
parent bc82d7544b
commit 754079f0e2

View File

@@ -10595,6 +10595,9 @@ begin
end;
end;
end;
//lclheader
RedrawWindow(Handle, @R, 0, RDW_FRAME or RDW_INVALIDATE or RDW_VALIDATE or RDW_NOINTERNALPAINT or
RDW_NOERASE or RDW_NOCHILDREN);
{
// Current position of the owner in screen coordinates.
@@ -29223,7 +29226,8 @@ begin
if toChildrenAbove in FOptions.FPaintOptions then
begin
PosHoldable := (FOffsetY + (Integer(Node.TotalHeight - NodeHeight[Node]))) <= 0;
NodeInView := Up.Top < ClientHeight;
//lclheader
NodeInView := Up.Top < inherited GetClientRect.Bottom;
Steps := 0;
if NodeInView then
begin
@@ -29240,7 +29244,8 @@ begin
FOffsetY + (Up.Bottom - Integer(Node.TotalHeight)));
Up.Top := Max(Up.Bottom - Integer(Node.TotalHeight),
FOffsetY + (Up.Bottom - Integer(Node.TotalHeight)));
Up.Bottom := ClientHeight;
//lclheader
Up.Bottom := inherited GetClientRect.Bottom;
end;
end;
end
@@ -29248,12 +29253,15 @@ begin
begin
Mode := tamScrollUp;
Inc(Up.Top, NodeHeight[Node]);
Up.Bottom := ClientHeight;
//lclheader
Up.Bottom := inherited GetClientRect.Bottom;
Steps := Min(Up.Bottom - Up.Top + 1, Node.TotalHeight - NodeHeight[Node]);
end;;
end;
// No animation necessary if the node is below the current client height.
if Up.Top < ClientHeight then
//lclheader
if Up.Top < inherited GetClientRect.Bottom then
begin
Window := Handle;
DC := GetDC(Handle);
@@ -29327,12 +29335,14 @@ begin
// is to keep the nodes visual position so the user does not get confused. As a result we need to
// scroll the view when the expanding is done. To determine what to do after expanding we need to check
// the cases below.
TotalFit := NewHeight + Integer(NodeHeight[Node]) <= ClientHeight;
PosHoldable := TotalFit and ((FOffsetY - NewHeight) >= -(Integer(FRangeY) - ClientHeight));
//lclheader
//todo: add a variable to hold the actual clientheight
TotalFit := NewHeight + Integer(NodeHeight[Node]) <= inherited GetClientRect.Bottom;
PosHoldable := TotalFit and ((FOffsetY - NewHeight) >= -(Integer(FRangeY) - inherited GetClientRect.Bottom));
ChildrenInView := (Down.Top - NewHeight) >= 0;
NodeInView := (PosHoldable or ((Down.Bottom + NewHeight) <= ClientHeight))
and (Down.Bottom < ClientHeight - 1);
Down.Bottom := ClientHeight;
NodeInView := (PosHoldable or ((Down.Bottom + NewHeight) <= inherited GetClientRect.Bottom))
and (Down.Bottom < inherited GetClientRect.Bottom - 1);
Down.Bottom := inherited GetClientRect.Bottom;
end;
end;