Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: msblazarus on January 10, 2021, 01:36:08 am

Title: [SOLVED] (by copy the app): BigSur-Dialog-ShowMessage-Empty/Bad Icon
Post by: msblazarus on January 10, 2021, 01:36:08 am
Sorry for your time... -> This case is solved for me - if I copy the app then the message is shown with correct icon (from .icns-file) - so it seems to be a problem only when I integrate the .icns-file into my app first time - maybe operating-system does not refresh...

This was the problem:
Hello to All,
if I use Dialog-ShowMessage it shows no/empty icon (badicon) - as shown in attached screenshot. I didn't find out how to set the icon correctly. Can someone help me out, how or where I can set the icon? (I put the .icns file into app-package and set it in Info.plist - App-Icon is shown correctly -- and I load .ico-file for program in project-options-application and set icon for form -- all is ok, only the message has no icon). Thank you a lot.
(System:BigSur 11.1 - Lazarus 2.0.10 - FPC 3.2.0 - x86-64-darwin-cocoa)

Code that generates the attached screenshot (without empty bad icon):
uses ..., Dialogs ...
ShowMessage('bad icon? - Dialogs-ShowMessage - bigsur');
Title: Re: [SOLVED] (by copy the app): BigSur-Dialog-ShowMessage-Empty/Bad Icon
Post by: trev on January 10, 2021, 02:19:11 am
The Wiki article Adding an icon to your app (https://wiki.freepascal.org/Apple-specific_UI_elements#Adding_an_icon_to_your_app_bundle) explains this phenomenon and provides fixes.
Title: Re: [SOLVED] (by copy the app): BigSur-Dialog-ShowMessage-Empty/Bad Icon
Post by: msblazarus on January 10, 2021, 02:24:39 am
Yes - thank you and sorry for your time - I had read this article before - but I didn't realize that the icon in ShowMessage was affected from this too and because finder already showed the app with the correct icon...
TinyPortal © 2005-2018