mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 22:39:30 +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
|
||||
begin
|
||||
lOldScrollY := AWindowHandle.ScrollY;
|
||||
AWindowHandle.ScrollY := AWindowHandle.LastMousePos.Y - lEventPos.Y;
|
||||
AWindowHandle.ScrollY := AWindowHandle.LastMousePos.Y - lEventPos.Y + AWindowHandle.ScrollY;
|
||||
AWindowHandle.SanityCheckScrollPos();
|
||||
if AWindowHandle.ScrollY <> lOldScrollY then LCLIntf.InvalidateRect(HWND(AWindowHandle), nil, False);
|
||||
end;
|
||||
|
@ -513,7 +513,9 @@ begin
|
||||
struct.hdc := HDC(ACanvas);
|
||||
|
||||
// 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
|
||||
{$IFDEF VerboseCDForms}
|
||||
|
Loading…
Reference in New Issue
Block a user