mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 22:59:27 +02:00
Qt5,Qt6: fix GetWindowSize regression. issue #41575
This commit is contained in:
parent
cc809e40b9
commit
dadc0e93e2
@ -4476,6 +4476,12 @@ begin
|
||||
GetClientRect(Handle, ARect);
|
||||
Width := ARect.Width;
|
||||
Height := ARect.Height;
|
||||
{$IFDEF QTSCROLLABLEFORMS}
|
||||
if TQtMainWindow(Handle).ScrollArea.verticalScrollBar.getVisible then
|
||||
inc(Height, TQtMainWindow(Handle).ScrollArea.verticalScrollBar.getWidth);
|
||||
if TQtMainWindow(Handle).ScrollArea.horizontalScrollBar.getVisible then
|
||||
inc(Width, TQtMainWindow(Handle).ScrollArea.horizontalScrollBar.getHeight);
|
||||
{$ENDIF}
|
||||
end else
|
||||
begin
|
||||
ASize := TQtWidget(Handle).getSize;
|
||||
|
@ -4504,6 +4504,12 @@ begin
|
||||
GetClientRect(Handle, ARect);
|
||||
Width := ARect.Width;
|
||||
Height := ARect.Height;
|
||||
{$IFDEF QTSCROLLABLEFORMS}
|
||||
if TQtMainWindow(Handle).ScrollArea.verticalScrollBar.getVisible then
|
||||
inc(Height, TQtMainWindow(Handle).ScrollArea.verticalScrollBar.getWidth);
|
||||
if TQtMainWindow(Handle).ScrollArea.horizontalScrollBar.getVisible then
|
||||
inc(Width, TQtMainWindow(Handle).ScrollArea.horizontalScrollBar.getHeight);
|
||||
{$ENDIF}
|
||||
end else
|
||||
begin
|
||||
ASize := TQtWidget(Handle).getSize;
|
||||
|
Loading…
Reference in New Issue
Block a user