Qt5, Qt6: rect should be bounds rect.

(cherry picked from commit 88f7910c32)

Co-authored-by: zeljan1 <zeljko@holobit.hr>
This commit is contained in:
Željan Rikalo 2025-01-05 00:15:44 +00:00 committed by Željan Rikalo
parent 173dc5a733
commit 9e0fb2947b
2 changed files with 8 additions and 8 deletions

View File

@ -533,7 +533,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
@ -543,7 +543,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;
@ -555,7 +555,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;
@ -568,7 +568,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

@ -531,7 +531,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
@ -541,7 +541,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;
@ -553,7 +553,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;
@ -566,7 +566,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}