mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 22:00:18 +02:00
carbon: added support for TMenuItem.HasIcon
git-svn-id: trunk@20232 -
This commit is contained in:
parent
de7660d56f
commit
99faf82528
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user