* Fix scrolling position when navigating with the arrow keys

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@413 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2008-04-10 04:15:34 +00:00
parent 40fa686aa4
commit 881de4fd3a

View File

@@ -24080,11 +24080,10 @@ begin
end; end;
end; end;
//lclheader //lclheader
//todo: add a parameter to decide if the result must be returned as
//a tree offset or a control offset
if hoVisible in FHeader.FOptions then if hoVisible in FHeader.FOptions then
begin OffsetRect(Result, 0, FHeader.Height);
inc(Result.Top, FHeader.Height);
inc(Result.Bottom, FHeader.Height);
end;
//Logger.Send([lcPaintHeader],'DisplayRect for Node '+IntToStr(Node^.Index),Result); //Logger.Send([lcPaintHeader],'DisplayRect for Node '+IntToStr(Node^.Index),Result);
//Logger.ExitMethod([lcPaintHeader],'GetDisplayRect'); //Logger.ExitMethod([lcPaintHeader],'GetDisplayRect');
end; end;
@@ -27654,6 +27653,7 @@ var
NewOffset: Integer; NewOffset: Integer;
begin begin
//todo: minimize calls to ClientHeight and ClientWidth
Result := False; Result := False;
if Assigned(Node) and (Node <> FRoot) then if Assigned(Node) and (Node <> FRoot) then
begin begin
@@ -27675,7 +27675,8 @@ begin
// 1) scroll vertically // 1) scroll vertically
//lclheader //lclheader
if hoVisible in FHeader.FOptions then if hoVisible in FHeader.FOptions then
Dec(R.Top,FHeader.Height); OffsetRect(R, 0, -FHeader.Height);
if R.Top < 0 then if R.Top < 0 then
begin begin
if Center then if Center then