mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 02:19:37 +02:00
Improves LCL-CustomDrawn scrolling
git-svn-id: trunk@34526 -
This commit is contained in:
parent
9887d5131e
commit
3943362c0c
@ -176,7 +176,7 @@ begin
|
|||||||
if AWindowHandle.IsScrolling then
|
if AWindowHandle.IsScrolling then
|
||||||
begin
|
begin
|
||||||
lOldScrollY := AWindowHandle.ScrollY;
|
lOldScrollY := AWindowHandle.ScrollY;
|
||||||
AWindowHandle.ScrollY := AWindowHandle.LastMousePos.Y - lEventPos.Y;
|
AWindowHandle.ScrollY := AWindowHandle.LastMousePos.Y - lEventPos.Y + AWindowHandle.ScrollY;
|
||||||
AWindowHandle.SanityCheckScrollPos();
|
AWindowHandle.SanityCheckScrollPos();
|
||||||
if AWindowHandle.ScrollY <> lOldScrollY then LCLIntf.InvalidateRect(HWND(AWindowHandle), nil, False);
|
if AWindowHandle.ScrollY <> lOldScrollY then LCLIntf.InvalidateRect(HWND(AWindowHandle), nil, False);
|
||||||
end;
|
end;
|
||||||
|
@ -513,7 +513,9 @@ begin
|
|||||||
struct.hdc := HDC(ACanvas);
|
struct.hdc := HDC(ACanvas);
|
||||||
|
|
||||||
// Consider the form scrolling
|
// Consider the form scrolling
|
||||||
ACanvas.BaseWindowOrg := Point(0, - lWindowHandle.ScrollY);
|
// ToDo: Figure out why this "div 2" factor is necessary for drawing non-windows controls and remove this factor
|
||||||
|
ACanvas.BaseWindowOrg := Point(0, - lWindowHandle.ScrollY div 2);
|
||||||
|
ACanvas.WindowOrg := Point(0, 0);
|
||||||
|
|
||||||
// Send the paint message to the LCL
|
// Send the paint message to the LCL
|
||||||
{$IFDEF VerboseCDForms}
|
{$IFDEF VerboseCDForms}
|
||||||
|
Loading…
Reference in New Issue
Block a user