mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 18:39:05 +02:00
change TCustomImagelist.AddLazarusResource: now it can be loaded from any supported graphic format
git-svn-id: trunk@13228 -
This commit is contained in:
parent
cbf87fe0b5
commit
478cd5c347
@ -152,11 +152,9 @@ function TCustomImageList.AddLazarusResource(const ResourceName: string; MaskCol
|
||||
var
|
||||
Bmp: TBitmap;
|
||||
begin
|
||||
Bmp := TBitmap.Create;
|
||||
|
||||
Bmp := LoadBitmapFromLazarusResource(ResourceName);
|
||||
if MaskColor <> clNone then
|
||||
Bmp.TransparentColor := MaskColor;
|
||||
Bmp.LoadFromLazarusResource(ResourceName);
|
||||
Bmp.Mask(MaskColor);
|
||||
Result := Add(Bmp, nil);
|
||||
Bmp.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user