mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 18:03:47 +02:00
IDE: clean up
git-svn-id: trunk@26101 -
This commit is contained in:
parent
55d0d47616
commit
e08543719c
@ -69,7 +69,6 @@
|
||||
ToDo:
|
||||
- popup menu
|
||||
- shrink side left, top, right, bottom
|
||||
- fpdoc
|
||||
- simple way to make forms dockable at designtime
|
||||
- minimize button and Hide => show in header
|
||||
- on close button: save a default layout
|
||||
|
@ -191,33 +191,29 @@ begin
|
||||
|
||||
RadioButton.Enabled := True;
|
||||
RadioButton.Checked := (APlacement = Layout.WindowPlacement);
|
||||
|
||||
if APlacement = iwpCustomPosition then
|
||||
begin
|
||||
// custom window position
|
||||
if Layout.CustomCoordinatesAreValid then
|
||||
begin
|
||||
LeftEdit.Value := Layout.Left;
|
||||
TopEdit.Value := Layout.Top;
|
||||
WidthEdit.Value := Layout.Width;
|
||||
HeightEdit.Value := Layout.Height;
|
||||
end
|
||||
else
|
||||
if Layout.Form <> nil then
|
||||
begin
|
||||
LeftEdit.Value := Layout.Form.Left;
|
||||
TopEdit.Value := Layout.Form.Top;
|
||||
WidthEdit.Value := Layout.Form.Width;
|
||||
HeightEdit.Value := Layout.Form.Height;
|
||||
end
|
||||
else
|
||||
begin
|
||||
LeftEdit.Value := 0;
|
||||
TopEdit.Value := 0;
|
||||
WidthEdit.Value := 0;
|
||||
HeightEdit.Value := 0;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
// custom window position
|
||||
if Layout.CustomCoordinatesAreValid then
|
||||
begin
|
||||
LeftEdit.Value := Layout.Left;
|
||||
TopEdit.Value := Layout.Top;
|
||||
WidthEdit.Value := Layout.Width;
|
||||
HeightEdit.Value := Layout.Height;
|
||||
end
|
||||
else
|
||||
if Layout.Form <> nil then
|
||||
begin
|
||||
LeftEdit.Value := Layout.Form.Left;
|
||||
TopEdit.Value := Layout.Form.Top;
|
||||
WidthEdit.Value := Layout.Form.Width;
|
||||
HeightEdit.Value := Layout.Form.Height;
|
||||
end
|
||||
else
|
||||
begin
|
||||
LeftEdit.Value := 0;
|
||||
TopEdit.Value := 0;
|
||||
WidthEdit.Value := 0;
|
||||
HeightEdit.Value := 0;
|
||||
end;
|
||||
|
||||
GetWindowPositionButton.Enabled := (Layout.Form <> nil);
|
||||
|
@ -504,20 +504,22 @@ end;
|
||||
procedure TSimpleWindowLayout.SetForm(const AValue: TCustomForm);
|
||||
begin
|
||||
if fForm=AValue then exit;
|
||||
if (Form<>nil) then
|
||||
RemoveFreeNotification(Form);
|
||||
fForm:=AValue;
|
||||
if (Form<>nil) then begin
|
||||
fFormID := FForm.Name;
|
||||
FFormCaption := fForm.Caption;
|
||||
FreeNotification(fForm);
|
||||
fFormID := Form.Name;
|
||||
FFormCaption := Form.Caption;
|
||||
FreeNotification(Form);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSimpleWindowLayout.GetFormID: string;
|
||||
begin
|
||||
if FForm=nil then
|
||||
if Form=nil then
|
||||
Result:=fFormID
|
||||
else
|
||||
Result:=FForm.Name;
|
||||
Result:=Form.Name;
|
||||
end;
|
||||
|
||||
function TSimpleWindowLayout.GetXMLFormID: string;
|
||||
|
Loading…
Reference in New Issue
Block a user