Qt5, Qt6: rect should be bounds rect.

This commit is contained in:
zeljan1 2025-01-04 21:21:51 +01:00
parent 15e4e09988
commit 88f7910c32
2 changed files with 8 additions and 8 deletions

View File

@ -543,7 +543,7 @@ var
begin
if not WSCheckHandleAllocated(AWincontrol, 'SetBounds') then
Exit;
R := Rect(ALeft, ATop, AWidth, AHeight);
R := Bounds(ALeft, ATop, AWidth, AHeight);
Box := nil;
if Assigned(AWinControl.Parent) and
@ -553,7 +553,7 @@ begin
if Assigned(Box) and
(Box.ChildOfComplexWidget = ccwScrollingWinControl) then
begin
R := Rect(ALeft - TQtCustomControl(Box).horizontalScrollBar.getValue,
R := Bounds(ALeft - TQtCustomControl(Box).horizontalScrollBar.getValue,
ATop - TQtCustomControl(Box).verticalScrollBar.getValue, AWidth, AHeight);
end;
@ -565,7 +565,7 @@ begin
if Assigned(TQtMainWindow(AForm.Handle).ScrollArea) then
begin
Box := TQtMainWindow(AForm.Handle).ScrollArea;
R := Rect(ALeft - TQtWindowArea(Box).horizontalScrollBar.getValue,
R := Bounds(ALeft - TQtWindowArea(Box).horizontalScrollBar.getValue,
ATop - TQtWindowArea(Box).verticalScrollBar.getValue, AWidth, AHeight);
end;
end;
@ -578,7 +578,7 @@ begin
with R do
begin
TQtWidget(AWinControl.Handle).move(Left, Top);
TQtWidget(AWinControl.Handle).resize(Right, Bottom);
TQtWidget(AWinControl.Handle).resize(Right - Left, Bottom - Top);
end;
TQtWidget(AWinControl.Handle).EndUpdate;
{$IFDEF VerboseQtResize}

View File

@ -541,7 +541,7 @@ var
begin
if not WSCheckHandleAllocated(AWincontrol, 'SetBounds') then
Exit;
R := Rect(ALeft, ATop, AWidth, AHeight);
R := Bounds(ALeft, ATop, AWidth, AHeight);
Box := nil;
if Assigned(AWinControl.Parent) and
@ -551,7 +551,7 @@ begin
if Assigned(Box) and
(Box.ChildOfComplexWidget = ccwScrollingWinControl) then
begin
R := Rect(ALeft - TQtCustomControl(Box).horizontalScrollBar.getValue,
R := Bounds(ALeft - TQtCustomControl(Box).horizontalScrollBar.getValue,
ATop - TQtCustomControl(Box).verticalScrollBar.getValue, AWidth, AHeight);
end;
@ -563,7 +563,7 @@ begin
if Assigned(TQtMainWindow(AForm.Handle).ScrollArea) then
begin
Box := TQtMainWindow(AForm.Handle).ScrollArea;
R := Rect(ALeft - TQtWindowArea(Box).horizontalScrollBar.getValue,
R := Bounds(ALeft - TQtWindowArea(Box).horizontalScrollBar.getValue,
ATop - TQtWindowArea(Box).verticalScrollBar.getValue, AWidth, AHeight);
end;
end;
@ -576,7 +576,7 @@ begin
with R do
begin
TQtWidget(AWinControl.Handle).move(Left, Top);
TQtWidget(AWinControl.Handle).resize(Right, Bottom);
TQtWidget(AWinControl.Handle).resize(Right - Left, Bottom - Top);
end;
TQtWidget(AWinControl.Handle).EndUpdate;
{$IFDEF VerboseQtResize}