From: Andreas H. <ah...@us...> - 2004-02-21 21:40:48
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15221/run Modified Files: JvEditorCommon.pas Log Message: Fixed optimized scrolling Index: JvEditorCommon.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvEditorCommon.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JvEditorCommon.pas 26 Jan 2004 08:58:24 -0000 1.1 --- JvEditorCommon.pas 21 Feb 2004 21:28:38 -0000 1.2 *************** *** 2755,2759 **** if Vert then begin {Vertical Scroll} ! { it is optimized [translated] } OldFTopRow := FTopRow; FTopRow := ScrollPos; --- 2755,2759 ---- if Vert then begin {Vertical Scroll} ! { optimized scrolling } OldFTopRow := FTopRow; FTopRow := ScrollPos; *************** *** 2762,2768 **** begin R := FEditorClient.ClientRect; ! R.Bottom := R.Top + CellRect.Height * (FVisibleRowCount + 1); {??} R.Left := 0; // update gutter RClip := R; ScrollDC( FEditorClient.Canvas.Handle, // handle of device context --- 2762,2769 ---- begin R := FEditorClient.ClientRect; ! R.Bottom := R.Top + CellRect.Height * FVisibleRowCount; R.Left := 0; // update gutter RClip := R; + Inc(RClip.Bottom, CellRect.Height); ScrollDC( FEditorClient.Canvas.Handle, // handle of device context *************** *** 2774,2777 **** --- 2775,2779 ---- @RUpdate // address of structure for update rectangle ); + Inc(RUpdate.Bottom, FCellRect.Height); InvalidateRect(Handle, @RUpdate, False); end *************** *** 2783,2787 **** else {Horizontal Scroll} begin ! { it is not optimized [translated] } OldFLeftCol := FLeftCol; FLeftCol := ScrollPos; --- 2785,2789 ---- else {Horizontal Scroll} begin ! { optimized scrolling } OldFLeftCol := FLeftCol; FLeftCol := ScrollPos; *************** *** 2790,2795 **** begin R := FEditorClient.ClientRect; ! R.Right := R.Left + CellRect.Width * (FVisibleColCount + 1); {??} RClip := R; ScrollDC( FEditorClient.Canvas.Handle, // handle of device context --- 2792,2798 ---- begin R := FEditorClient.ClientRect; ! R.Right := R.Left + CellRect.Width * FVisibleColCount; RClip := R; + Inc(RClip.Right, CellRect.Width); ScrollDC( FEditorClient.Canvas.Handle, // handle of device context |