dustinkredmond / FXTrayIcon

Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.
MIT License
327 stars 26 forks source link

White square around icon #49

Closed DBChoco closed 2 years ago

DBChoco commented 2 years ago

Does anyone know how I can remove the white square here ?

https://i.imgur.com/OSgLx1p.png

I'm on Arch linux, using XFCE4. Thanks for the help.

dustinkredmond commented 2 years ago

Are you using a transparent PNG for the image?

DBChoco commented 2 years ago

Yes I am, shouldn't I ?

dustinkredmond commented 2 years ago

It would have been my suggestion to do exactly this (use a transparent PNG). Unfortunately, FXTrayIcon is merely an abstraction for the AWT TrayIcon, so any issue such as this one should be submitted as a bug report against the AWT implementation. It may be possible to try other formats for you desktop environment, but unfortunately this is not a bug that the maintainers of this particular library are able to address.

EasyG0ing1 commented 2 years ago

@DBChoco - Have you tested it using one of the built-in tray icons to see if the behavior is the same? Because even though you might have a transparent png image as your icon, it might have pixels in it with an opacity low enough that it would not show up under normal viewing, but in certain circumstances, those pixels might get highlighted. So I would try with one of the built-in icons just to be sure that the behavior is consistent regardless of the icon image used.

There is a ready-to-run test app under src/test... called DefaultIconTest, I would run that and see if the behavior is still the same.

DBChoco commented 2 years ago

@DBChoco - Have you tested it using one of the built-in tray icons to see if the behavior is the same? Because even though you might have a transparent png image as your icon, it might have pixels in it with an opacity low enough that it would not show up under normal viewing, but in certain circumstances, those pixels might get highlighted. So I would try with one of the built-in icons just to be sure that the behavior is consistent regardless of the icon image used.

There is a ready-to-run test app under src/test... called DefaultIconTest, I would run that and see if the behavior is still the same.

Hi there, I just tested the default icon, and I have the same result: https://i.imgur.com/AA3Ihif.png I couldn't get it on a screenshot but even the menu items look really bad, like out of Windows 95.

It's really a shame since it seems like there is no direct solution, should I close the issue ?

EasyG0ing1 commented 2 years ago

@DBChoco - I just ran the DefaultIcon code on a Windows 11 virtual machine and I'm not seeing the same behavior that you're seeing ... could it be something with your particular setup in Windows?

Screen Shot 2022-05-08 at 12 19 08 PM
DBChoco commented 2 years ago

@EasyG0ing1 I'm actually on XFCE (arch linux), isn't it supported ?

EasyG0ing1 commented 2 years ago

@DBChoco - Anything Linux and JavaFX can be ... "mystery meat" ... but then mix FX with AWT and all bets are off for anything consistent among Linux builds. I do know it has a lot to do with whether or not your desktop environment has support specifically for JavaFX ... I know that some Gnome builds do while others don't and beyond that, I'm not all that read up on it. I use MacOS myself the majority of the time - best of both worlds, at least for me.

:-)

DBChoco commented 2 years ago

but then mix FX with AWT @EasyG0ing1 By FX are you talking about this module ? Then should I use FX for Windows & macOS and use a customized AWT System tray for Linux ?

EasyG0ing1 commented 2 years ago

@DBChoco - No, when I say FX, That's just the lazy way of saying JavaFX

DBChoco commented 2 years ago

Oh okay, seems likes I misunderstood your previous reply. I think I'll close this now then, since it seems like there is no way you could fix it. Thanks for all the replies and advice, I appreciate it.

EasyG0ing1 commented 2 years ago

@DBChoco - Yeah ... modifying core Java AWT libraries - or more specifically - fixing what Oracle never did right in the first place, isn't really in my skillset, unfortunately. ☺