mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:52:11 +02:00
Carbon: offset invalidated rect by scrolloffset in InvalidateRect(). issue #21364
git-svn-id: trunk@35884 -
This commit is contained in:
parent
9652b47265
commit
6acda204b2
@ -2331,6 +2331,8 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
function TCarbonWidgetSet.InvalidateRect(AHandle: HWND; Rect: pRect;
|
||||
bErase: Boolean): Boolean;
|
||||
var
|
||||
Pt: TPoint;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
@ -2339,7 +2341,12 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
if not CheckWidget(AHandle, 'InvalidateRect') then Exit;
|
||||
|
||||
|
||||
if Rect <> nil then
|
||||
begin
|
||||
Pt := TCarbonWidget(AHandle).ScrollOffset;
|
||||
OffsetRect(Rect^, -Pt.X, -Pt.Y);
|
||||
end;
|
||||
TCarbonWidget(AHandle).Invalidate(Rect);
|
||||
Result := True;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user