carbon: added support for TMenuItem.HasIcon

git-svn-id: trunk@20232 -
This commit is contained in:
dmitry 2009-05-26 10:41:21 +00:00
parent de7660d56f
commit 99faf82528

View File

@ -582,13 +582,12 @@ begin
AHandle := nil;
CGImage := nil;
if (ABitmap <> nil) and (ABitmap.Width > 0) and (ABitmap.Height > 0) then
if (LCLMenuItem.HasIcon) and (ABitmap <> nil) and (ABitmap.Width > 0) and (ABitmap.Height > 0) then
begin
if not CheckBitmap(ABitmap.Handle, SName) then Exit;
IconType := kMenuCGImageRefType;
CGImage :=
TCarbonBitmap(ABitmap.Handle).CreateMaskedImage(TCarbonBitmap(ABitmap.MaskHandle));
CGImage := TCarbonBitmap(ABitmap.Handle).CreateMaskedImage(TCarbonBitmap(ABitmap.MaskHandle));
if CGImage <> nil then
AHandle := Pointer(CGImage);
end;