Qt5,Qt6: fixed offset when using docked form editor and form contains main menu.issue #41637

This commit is contained in:
zeljan1 2025-05-13 10:33:35 +02:00
parent 8fb7e57694
commit cb87ad069d
2 changed files with 10 additions and 0 deletions

View File

@ -7624,7 +7624,12 @@ begin
Result := inherited getClientOffset;
if Assigned(ScrollArea) and Assigned(FMenuBar) and
(FMenuBar.getVisible) then
begin
if Assigned(LCLObject) and IsFormDesign(LCLObject) and (LCLObject.Parent <> nil) then
// issue #41637
else
inc(Result.Y, FMenuBar.getHeight);
end;
{$ELSE}
Result:=inherited getClientOffset;
{$ENDIF}

View File

@ -7544,7 +7544,12 @@ begin
Result := inherited getClientOffset;
if Assigned(ScrollArea) and Assigned(FMenuBar) and
(FMenuBar.getVisible) then
begin
if Assigned(LCLObject) and IsFormDesign(LCLObject) and (LCLObject.Parent <> nil) then
// issue #41637
else
inc(Result.Y, FMenuBar.getHeight);
end;
{$ELSE}
Result:=inherited getClientOffset;
{$ENDIF}