sparta: partially revert r51141 #3a6b0c9da3: when undocking source editor, the designer form got visible windows border (on windows/win32).

git-svn-id: trunk@51343 -
This commit is contained in:
ondrej 2016-01-19 19:30:26 +00:00
parent 60f10326df
commit 7967d77c82
2 changed files with 27 additions and 1 deletions

View File

@ -894,8 +894,35 @@ begin
end;
function TDesignedFormImpl.PositionDelta: TPoint;
procedure FormBorderDelta;
var
LTestCtrl: TWinControl;
LTestRec, LFormRect: TRect;
LForm: TCustomForm;
begin
LForm := GetForm;
LTestCtrl := TWinControl.Create(Self);
try
LTestCtrl.Parent := LForm;
LTestCtrl.Left := 0;
LTestCtrl.Top := 0;
GetWindowRect(LForm.Handle, LFormRect);
GetWindowRect(LTestCtrl.Handle, LTestRec);
Result.x := Result.x + Max(LTestRec.Left - LFormRect.Left, 0);
Result.y := Result.y + Max(LTestRec.Top - LFormRect.Top, 0);
finally
LTestCtrl.free;
end;
end;
begin
Result := Point(0, 0);
{$IFDEF WINDOWS}
FormBorderDelta;
{$ENDIF}
end;
procedure TDesignedFormImpl.SetOnChangeHackedBounds(const AValue: TNotifyEvent);

View File

@ -109,7 +109,6 @@ begin
FDesignedForm.BeginUpdate;
FDesignedForm.Form.Parent := FResizerFrame.pClient;
FDesignedForm.Form.BorderStyle := bsNone;
// for big forms (bigger than screen resolution) we need to refresh Real* values
DesignedForm.RealWidth := DesignedForm.Width;
DesignedForm.RealHeight := DesignedForm.Height;