mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-05 23:32:33 +02:00
IDE: Add initial directory for loading project icon in App options. Use IconImage.Picture.Icon everywhere.
git-svn-id: trunk@59245 -
This commit is contained in:
parent
e0503fa7ed
commit
b63e95189f
@ -153,8 +153,8 @@ end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.ClearIconButtonClick(Sender: TObject);
|
||||
begin
|
||||
fIconChanged:=true;
|
||||
IconImage.Picture.Clear;
|
||||
fIconChanged:=true;
|
||||
end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.CreateAppBundleButtonClick(Sender: TObject);
|
||||
@ -170,9 +170,11 @@ end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.LoadIconButtonClick(Sender: TObject);
|
||||
begin
|
||||
if OpenPictureDialog1.InitialDir='' then
|
||||
OpenPictureDialog1.InitialDir:=FProject.Directory;
|
||||
if not OpenPictureDialog1.Execute then exit;
|
||||
try
|
||||
IconImage.Picture.LoadFromFile(OpenPictureDialog1.FileName);
|
||||
IconImage.Picture.Icon.LoadFromFile(OpenPictureDialog1.FileName);
|
||||
fIconChanged:=true;
|
||||
except
|
||||
on E: Exception do
|
||||
@ -183,7 +185,7 @@ end;
|
||||
procedure TProjectApplicationOptionsFrame.SaveIconButtonClick(Sender: TObject);
|
||||
begin
|
||||
if SavePictureDialog1.Execute then
|
||||
IconImage.Picture.SaveToFile(SavePictureDialog1.FileName);
|
||||
IconImage.Picture.Icon.SaveToFile(SavePictureDialog1.FileName);
|
||||
end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.EnableManifest(aEnable: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user