norgepaul / TChromeTabs

Comprehensive Delphi implementation of Chrome's tab system
Other
218 stars 78 forks source link

Images not drawing under windows XP (Delphi XE 2) #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set the "Images" property to ImageList with png images (set Alpha channel 
like XP)
2. Create Tab and set ImageIndex to 1
3. Under WindowsXP i see white space but not a picture.

Fix:

unit ChromeTabsUtils;

function IconToGPImage(Icon: TIcon): TGPImage;
    Result := TGPImage.Create(TStreamAdapter.Create(MemStream));
>>>
    Result := TGPImage.Create(TStreamAdapter.Create(MemStream, soOwned));
and delete  FreeAndNil(MemStream);

function BitmapToGPBitmap(Bitmap: TBitmap): TGPBitmap;
    Result := TGPBitmap.Create(TStreamAdapter.Create(MemStream));
>>>>
    Result := TGPBitmap.Create(TStreamAdapter.Create(MemStream, soOwned));
and delete  FreeAndNil(MemStream);

PS: tnx for component!

Original issue reported on code.google.com by Coriolis...@gmail.com on 26 Jul 2013 at 10:47

GoogleCodeExporter commented 9 years ago
Fixed in latest rev. Thanks.

Original comment by paul.tho...@easy-ip.net on 19 Jun 2014 at 4:02