Qt: FScrollX & FScrollY should be applied to painting context only.

git-svn-id: trunk@17227 -
This commit is contained in:
zeljko 2008-11-04 23:07:09 +00:00
parent 4424f0ec6c
commit 6353e4b2da

View File

@ -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