thinkingrock-gtd / tr-pc

ThinkingRock for Personal Computers. Built on the Netbeans Platform.
https://trgtd.com.au
GNU General Public License v3.0
17 stars 13 forks source link

Missing application icon #28

Open RadekCap opened 1 year ago

RadekCap commented 1 year ago

When you run an application compiled from the source it has a Netbeans icon instead of a TR icon during switching applications.

ursjoss commented 1 year ago

This is not the case on my system. But I have a suspicion. @RadekCap Please check the following:

Image

As you can see, we have actual ThinkingRock icons in the sizes 16x16 to 48x48.However, for 256x256 and larger icons, we don't have an icon specified, falling back to the default Netbeans icon:

Image

Can you experiment by selecting a different random icon for each of those missing sizes and check if that changes the situation on your system? I suspect that the screen resolution and/or pixel depth of your system falls back to one of the larger icons, which is not defined.

In case you can confirm that, we should try to get the icon in the missing sizes from Claire and Jeremy (or alternatively as a vector graphic, so we can convert it to the pngs we need ourselves.

RadekCap commented 1 year ago

I've tried to create a larger icon without any effect on the application icon (on MacOS).

I can observe this behavior both on Linux and MacOS.

I'm going to experiment with this later.

RadekCap commented 1 year ago

Ehm, I tried it again on Linux and a replacement 256x256 icon will solve it.

Maybe I haven't used a proper format on macOS, I'll explore it more.

ursjoss commented 1 year ago

I created a request for larger icons in ticket #67.

RadekCap commented 1 year ago

This solution doesn't work on MacOS. So it'll need another exploration and fix.

RadekCap commented 1 year ago

Following this guide should fix the issue. I'll look into it later when there will be more time.

https://netbeans.apache.org/wiki/DevFaqExecutableIcon.html

degrown commented 1 year ago

Maybe it's irrelevant, but I can confirm that I don't see the TR icon; however, I don't see either the Netbeans icon, but something like this one (it's a bit different, but you get the idea):

image

ursjoss commented 1 year ago

Maybe it's irrelevant, but I can confirm that I don't see the TR icon; however, I don't see either the Netbeans icon, but something like this one (it's a bit different, but you get the idea):

I think the installer that I provided was built before #68 was merged to main. I will update it and let you know to get the newer one when there...

RadekCap commented 1 year ago

@degrown is working on macOS where this bug is still valid, and I need to investigate it more. It's fixed on Linux.

The icon is the OpenJDK icon.

thegamer87 commented 1 year ago

Hi, trying to create the bundle for mac os x (through "ant build-mac") I noticed that the icon copied in the bundle is: netbeans-plat/17/harness/etc/applicationIcon.icns, trying to change this icon and doing a new build the bundle comes out with the updated icon, some simple google search point me to this netbeans wiki abount "DevFaqExecutableIcon": https://netbeans.apache.org/wiki/DevFaqExecutableIcon.html

I hope this can help you to solve the problem.

ursjoss commented 1 year ago

Hi @thegamer87

Thanks for your interest in TR, your report and investigation. The link looks relevant - even though on first glance, it looks like there is no out-of the box solution available from Netbeans. We may be able to implement a workaround though.

thegamer87 commented 1 year ago

I've tried following the instructions in the link under "Mac Icons" and it seems to work, specifically I have

  1. added correct trgtd icon ".icns" file (converted from one of .gif file used by linux application) in a subfolder of branding (obviously the file can be placed anywhere so it is then referenced in the build.xml, see next step)

    ➜ thinkingrock_git git:(main) ls -l branding/MacOS total 136 -rw-r--r--@ 1 verrocchiom staff 66774 Mar 20 08:59 trgtd.icns

  2. added to build.xml the descriptor from the documentation, this override build-mac target to replace the default .icns with my .icns (see attached patch file of build.xml)

In this way the bundle come out with my .icns instead of default .icns.

tr_build.xml.patch

ursjoss commented 1 year ago

@thegamer87 Yes, I was thinking of something like that. Would you like to create a PR with your already established solution?

thegamer87 commented 1 year ago

I've opened a PR #127 with more simple but out-of-the-box working solution (that not require any override in build manifest): digging into the build.mac target of suite.xml I've found that MacOS application icon is already read from the "app.icon.icns" property so I've simpy added this to nbproject/project.properties pointing to .icns file that i've added in branding/MacOS folder

ursjoss commented 8 months ago

See also https://github.com/tibirna/qgit/pull/142 for an issue (and a solution) regarding missing icons on Mac.