mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 15:19:11 +02:00
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:
parent
60f10326df
commit
7967d77c82
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user