patch from bug #19747: Masked property not set correctly when assigning TIcon to TBitmap

git-svn-id: trunk@32932 -
This commit is contained in:
sekelsenmat 2011-10-17 07:08:29 +00:00
parent 69140ad22a
commit 3577059604
2 changed files with 2 additions and 7 deletions

View File

@ -1615,7 +1615,6 @@ type
function GetIndex(AFormat: TPixelFormat; AHeight, AWidth: Word): Integer;
function GetBitmapHandle: HBITMAP; override;
class function GetDefaultSize: TSize; virtual;
function GetMasked: Boolean; override;
function GetMaskHandle: HBITMAP; override;
function GetPalette: HPALETTE; override;
function GetPixelFormat: TPixelFormat; override;

View File

@ -499,6 +499,8 @@ begin
inherited Create;
FCurrent := -1;
FRequestedSize := Size(0, 0);
// per definition an icon is masked, but maybe we should make it settable for alpha images
FMasked := True;
end;
procedure TCustomIcon.Delete(Aindex: Integer);
@ -556,12 +558,6 @@ begin
Result := TSharedIcon(FSharedImage).GetIndex(AFormat, AHeight, AWidth);
end;
function TCustomIcon.GetMasked: Boolean;
begin
// per definition an icon is masked, but maybe we should make it settable for alpha images
Result := True;
end;
function TCustomIcon.GetMaskHandle: HBITMAP;
begin
if FCurrent = -1