mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-05 03:19:34 +01:00
improved layout a bit
git-svn-id: trunk@8210 -
This commit is contained in:
parent
66bdc00353
commit
57c8f0abe2
@ -847,8 +847,7 @@ end;
|
|||||||
procedure TIDEWindowSetupLayoutComponent.LoadFrom(AnLayout: TIDEWindowLayout);
|
procedure TIDEWindowSetupLayoutComponent.LoadFrom(AnLayout: TIDEWindowLayout);
|
||||||
var
|
var
|
||||||
APlacement: TIDEWindowPlacement;
|
APlacement: TIDEWindowPlacement;
|
||||||
CurY1: Integer;
|
CurY: LongInt;
|
||||||
CurY2: LongInt;
|
|
||||||
Col2X: Integer;
|
Col2X: Integer;
|
||||||
PreviousButton: TRadioButton;
|
PreviousButton: TRadioButton;
|
||||||
|
|
||||||
@ -889,8 +888,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
if AnLayout=nil then exit;
|
if AnLayout=nil then exit;
|
||||||
CurY1:=5;
|
CurY:=5;
|
||||||
CurY2:=CurY1;
|
|
||||||
Col2X:=300;
|
Col2X:=300;
|
||||||
PreviousButton:= nil;
|
PreviousButton:= nil;
|
||||||
for APlacement:=Low(TIDEWindowPlacement) to High(TIDEWindowPlacement) do
|
for APlacement:=Low(TIDEWindowPlacement) to High(TIDEWindowPlacement) do
|
||||||
@ -917,14 +915,14 @@ begin
|
|||||||
iwpCustomPosition:
|
iwpCustomPosition:
|
||||||
begin
|
begin
|
||||||
// custom window position
|
// custom window position
|
||||||
SetLabelAndEdit(LeftLabel,LeftEdit,dlgLeftPos,Col2X,CurY2);
|
SetLabelAndEdit(LeftLabel,LeftEdit,dlgLeftPos,Col2X,CurY);
|
||||||
SetLabelAndEdit(TopLabel,TopEdit,dlgTopPos,
|
SetLabelAndEdit(TopLabel,TopEdit,dlgTopPos,
|
||||||
LeftEdit.Left+LeftEdit.Width+15,CurY2);
|
LeftEdit.Left+LeftEdit.Width+15,CurY);
|
||||||
inc(CurY2,LeftEdit.Height+3);
|
inc(CurY,LeftEdit.Height+6);
|
||||||
SetLabelAndEdit(WidthLabel,WidthEdit,dlgWidthPos,LeftLabel.Left,CurY2);
|
SetLabelAndEdit(WidthLabel,WidthEdit,dlgWidthPos,LeftLabel.Left,CurY);
|
||||||
SetLabelAndEdit(HeightLabel,HeightEdit,DlgHeightPos,
|
SetLabelAndEdit(HeightLabel,HeightEdit,DlgHeightPos,
|
||||||
WidthEdit.Left+WidthEdit.Width+15,CurY2);
|
WidthEdit.Left+WidthEdit.Width+15,CurY);
|
||||||
inc(CurY2,WidthEdit.Height+3);
|
inc(CurY,WidthEdit.Height+6);
|
||||||
if AnLayout.CustomCoordinatesAreValid then begin
|
if AnLayout.CustomCoordinatesAreValid then begin
|
||||||
LeftEdit.Text:=IntToStr(AnLayout.Left);
|
LeftEdit.Text:=IntToStr(AnLayout.Left);
|
||||||
TopEdit.Text:=IntToStr(AnLayout.Top);
|
TopEdit.Text:=IntToStr(AnLayout.Top);
|
||||||
@ -949,14 +947,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
inc(CurY1,2);
|
|
||||||
if ApplyButton=nil then
|
if ApplyButton=nil then
|
||||||
ApplyButton:=TButton.Create(Self);
|
ApplyButton:=TButton.Create(Self);
|
||||||
|
|
||||||
with ApplyButton do
|
with ApplyButton do
|
||||||
begin
|
begin
|
||||||
Parent:=Self;
|
Parent:=Self;
|
||||||
SetBounds(Col2X,CurY2,Width,Height);
|
SetBounds(Col2X,CurY,Width,Height);
|
||||||
OnClick:=@ApplyButtonClick;
|
OnClick:=@ApplyButtonClick;
|
||||||
Caption:=dlgButApply;
|
Caption:=dlgButApply;
|
||||||
AutoSize:=true;
|
AutoSize:=true;
|
||||||
@ -972,7 +969,7 @@ begin
|
|||||||
OnClick:=@GetWindowPositionButtonClick;
|
OnClick:=@GetWindowPositionButtonClick;
|
||||||
Caption:=dlgGetPosition;
|
Caption:=dlgGetPosition;
|
||||||
AutoSize:=true;
|
AutoSize:=true;
|
||||||
AnchorToNeighbour(akLeft,5,ApplyButton);
|
AnchorToNeighbour(akLeft,6,ApplyButton);
|
||||||
AnchorParallel(akTop,0,ApplyButton);
|
AnchorParallel(akTop,0,ApplyButton);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user