Images in TMenuItem not working in Cocoa/64bit (TMainMenu/TPopupMenu)
Original Reporter info from Mantis: Hansaplast
-
Reporter name: Hans Luijten
Original Reporter info from Mantis: Hansaplast
- Reporter name: Hans Luijten
Description:
When creating a menu (Cocoa widgetset, 64 bit, Lazarus 1.9.0 r57735M FPC 3.0.4), it seems that one cannot add icons/images in front of menu items. This affects TMainMenu and TPopupMenu obviously.
For testing, I compiled attached example project with Carbon and Cocoa.
Under Carbon the icons appear just fine, under Cocoa however no icon will be shown (see screenshot).
I've tried assigning an individual bitmap to the menu item as well, but this does not work in Cocoa either.
Steps to reproduce:
Create new application,
add TMainMenu and TImageList,
add some images to the TImageList,
assign TImageList to TMainMenu,
add some items to the TMainMenu and set an image index for each of the items.
Compile and run in Carbon: images appear in the menu.
Compile and run in Cocoa: no images appear in the menu
(see screenshot and attached text project)
Additional information:
I'm pretty sure this is TMenuItem related, just not sure if this is a Cocoa Limitation.
Also, OwnerDrawn is not working, but this is a known restriction (as far as I can see).
Mantis conversion info:
- Mantis ID: 33664
- OS: MacOS X
- OS Build: 10.13.4
- Build: Lazarus 1.9.0 r57735M FPC 3.0.4
- Platform: Mac
- Version: 1.8.3 (SVN)
- Fixed in revision: 58889 (#5a3687fe)
- Monitored by: » Hansaplast (Hans Luijten)