Qt: proper size initialization when using QtUseAccurateFrame define.

git-svn-id: trunk@51839 -
This commit is contained in:
zeljko 2016-03-07 09:00:33 +00:00
parent f6b117d8d5
commit 1ff8e0efb5

View File

@ -2052,6 +2052,17 @@ begin
move(FParams.X, FParams.Y);
if GetContainerWidget <> Widget then
QWidget_resize(GetContainerWidget, FParams.Width, FParams.Height);
{$IFDEF QTUSEACCURATEFRAME}
if IsFramedWidget then
begin
{$IFDEF DEBUGQTUSEACCURATEFRAME}
DebugLn(Format('TQtWidget.InitializeWidget: proposed width %d height %d',[FParams.Width, FParams.Height]),' WSFrame=',dbgs(QtWidgetSet.WSFrameMargins),' FFrame=',dbgs(FFrameMargins));
{$ENDIF}
if (QtWidgetSet.WSFrameMargins.Top > 0) then
FFrameMargins := QtWidgetSet.WSFrameMargins;
end;
{$ENDIF}
Resize(FParams.Width, FParams.Height);
FScrollX := 0;