mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:56:00 +02:00
Qt: FScrollX & FScrollY should be applied to painting context only.
git-svn-id: trunk@17227 -
This commit is contained in:
parent
4424f0ec6c
commit
6353e4b2da
@ -2391,7 +2391,7 @@ begin
|
|||||||
Msg.DC := Msg.DC;
|
Msg.DC := Msg.DC;
|
||||||
|
|
||||||
with getClientOffset do
|
with getClientOffset do
|
||||||
SetWindowOrgEx(Msg.DC, -X, -Y, nil);
|
SetWindowOrgEx(Msg.DC, -(X + FScrollX), -(Y + FScrollY), nil);
|
||||||
|
|
||||||
// send paint message
|
// send paint message
|
||||||
try
|
try
|
||||||
@ -2542,8 +2542,8 @@ procedure TQtWidget.OffsetMousePos(APoint: PQtPoint);
|
|||||||
begin
|
begin
|
||||||
with getClientOffset do
|
with getClientOffset do
|
||||||
begin
|
begin
|
||||||
dec(APoint^.x, x - FScrollX);
|
dec(APoint^.x, x);
|
||||||
dec(APoint^.y, y - FScrollY);
|
dec(APoint^.y, y);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2796,7 +2796,7 @@ begin
|
|||||||
else
|
else
|
||||||
P := QtPoint(0, 0);
|
P := QtPoint(0, 0);
|
||||||
R := getClientBounds;
|
R := getClientBounds;
|
||||||
Result := Point(P.x + R.Left + FScrollX, P.y + R.Top + FScrollY);
|
Result := Point(P.x + R.Left, P.y + R.Top);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtWidget.grabMouse;
|
procedure TQtWidget.grabMouse;
|
||||||
@ -8309,7 +8309,7 @@ end;
|
|||||||
function TQtAbstractScrollArea.getClientOffset: TPoint;
|
function TQtAbstractScrollArea.getClientOffset: TPoint;
|
||||||
begin
|
begin
|
||||||
with getClientBounds do
|
with getClientBounds do
|
||||||
Result := Point(Left + FScrollX, Top + FScrollY);
|
Result := Point(Left, Top);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtAbstractScrollArea.getClientBounds: TRect;
|
function TQtAbstractScrollArea.getClientBounds: TRect;
|
||||||
@ -9180,7 +9180,7 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
with getClientOffset do
|
with getClientOffset do
|
||||||
SetWindowOrgEx(Msg.DC, -X, -Y, nil);
|
SetWindowOrgEx(Msg.DC, -(X + FScrollX), -(Y + FScrollY), nil);
|
||||||
|
|
||||||
// send paint message
|
// send paint message
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user