mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 23:25:56 +02:00
Qt: use QWidget_geometry() when calculating default clientrect of TCustomForm while it's not mapped.
git-svn-id: trunk@45003 -
This commit is contained in:
parent
5320d568ad
commit
b4fb751782
@ -957,8 +957,8 @@ var
|
||||
ASize: TSize;
|
||||
begin
|
||||
Result := False;
|
||||
if AWinControl.HandleAllocated and not
|
||||
TQtMainWindow(AWinControl.Handle).testAttribute(QtWA_Mapped) then
|
||||
if AWinControl.HandleAllocated and
|
||||
not TQtMainWindow(AWinControl.Handle).testAttribute(QtWA_Mapped) then
|
||||
begin
|
||||
if Assigned(TCustomForm(AWinControl).Menu) then
|
||||
begin
|
||||
@ -966,7 +966,9 @@ begin
|
||||
if Assigned(AWin.MenuBar) then
|
||||
begin
|
||||
AWin.MenuBar.sizeHint(@ASize);
|
||||
aClientRect := AWin.getClientBounds;
|
||||
// we must use real geometry, and then exclude menubar height.
|
||||
aClientRect := AWin.getGeometry;
|
||||
OffsetRect(aClientRect, -aClientRect.Left, -aClientRect.Top);
|
||||
dec(AClientRect.Bottom, ASize.cy);
|
||||
{$IFDEF VerboseQtResize}
|
||||
DebugLn('TQtWSCustomForm.getDefaultClientRect ',dbgsName(AWinControl),' ',dbgs(AWin.getClientBounds),' mnuBarHeight ',dbgs(AWin.MenuBar.getHeight),' ASize=',dbgs(ASize),' FINAL=',dbgs(AClientRect));
|
||||
|
Loading…
Reference in New Issue
Block a user