Skip to content

Commit 538d950

Browse files
Robert Di PardoRobert Di Pardo
authored andcommitted
Adjust form height on construction
In cases where long directory paths needs wrapping, make the vertical growth visible the first time the form appears
1 parent 2286688 commit 538d950

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Forms/AboutForm.pas

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ TFrmAbout = class(TfpgForm)
5959
public
6060
constructor Create(AOwner: TComponent); override;
6161
destructor Destroy; override;
62+
procedure AfterCreate; override;
6263
published
6364
procedure DoOnShow({%H-}Sender: TObject);
6465
procedure FormClose({%H-}Sender: TObject);
@@ -179,6 +180,12 @@ destructor TFrmAbout.Destroy;
179180
inherited;
180181
end;
181182

183+
procedure TFrmAbout.AfterCreate;
184+
begin
185+
inherited;
186+
FindEntities;
187+
end;
188+
182189
procedure TFrmAbout.DoOnShow({%H-}Sender: TObject);
183190
begin
184191
FindEntities;
@@ -306,7 +313,7 @@ procedure TFrmAbout.WrapFilePath(Path: TfpgPanel);
306313
else
307314
begin
308315
WrapAt := Round(BtnWidth * 0.8);
309-
Bump := (Length(Text) div 4);
316+
Bump := (Length(Text) div 8);
310317
end;
311318

312319
if Length(Txt) > WrapAt then

0 commit comments

Comments
 (0)