lcl: insert images to imagelist without helper TBitmap - this simplifies, speedups the code and also fixes the problem of black backgrounds of delphi imagelists (by the way they were black because TBitmap.Masked was false for that helper bitmap)

git-svn-id: trunk@29702 -
This commit is contained in:
paul 2011-03-02 03:43:34 +00:00
parent 8ba345107d
commit c10f325df6

View File

@ -1063,7 +1063,6 @@ var
var
RawImage, SubRawImage: TRawImage;
ImgHandle, MaskHandle: HBitmap;
Img: TBitmap;
Row: Integer;
Col: Integer;
ImgRect: TRect;
@ -1088,13 +1087,8 @@ var
if not Res
then raise EInvalidGraphicOperation.Create('TCustomImageList.CreateImagesFromRawImage Create bitmaps');
Img := TBitmap.Create;
Img.SetHandles(ImgHandle, MaskHandle);
Add(Img, nil);
Img.Free;
InternalInsert(Count, ImgHandle, MaskHandle, Width, Height);
//DebugLn('CreateImagesFromRawImage B ',Img.Width,',',Img.Height,' ',Count);
Img := nil;
Dec(NewCount);
end;
end;