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
(cherry picked from commit dadc0e93e2
)
Co-authored-by: zeljan1 <zeljko@holobit.hr>
This commit is contained in:
parent
e54a83fb6e
commit
08e7c91f0c
@ -4440,6 +4440,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;
|
||||
|
@ -4450,6 +4450,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