dorkbox / SystemTray

Cross-platform SystemTray support for Swing/AWT, macOS, GtkStatusIcon, and AppIndicator on Java 8+
Other
446 stars 58 forks source link

The transparent part of png icon shows totally black #132

Closed hp7hao closed 3 years ago

hp7hao commented 3 years ago

Hi there, I encountered something strange. The icon can't be displayed correctly. My png icon has a transparent background, but the transparent part is totally black I added -Djdk.gtk.version=3 to run my app and the menu correctly adopted gtk theme.

image image

OS: Manjaro KDE Java 11 JavaFX 11

` (java:11060): Gtk-WARNING **: 16:03:13.901: Theme parsing error: gtk.css:2:33: Failed to import: Error opening file /home/phph/.config/gtk-3.0/window_decorations.css: No such file or directory SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by dorkbox.util.Swt (file:/home/phph/.m2/repository/com/dorkbox/SystemTray/3.17/SystemTray-3.17.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String) WARNING: Please consider reporting this to the maintainers of dorkbox.util.Swt WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

(java:11060): Gdk-WARNING **: 16:03:15.457: XSetErrorHandler() called with a GDK error trap pushed. Don't do that. ` Any advice is welcomed and thanks for your efforts on this good library.

dorkbox commented 3 years ago

In order to narrow down what is causing transparency issues, can you run my test examples?

Can you also run your example without javafx?

I don't know if KDE is causing issues, or if it's javafx.

dorkbox commented 3 years ago

Fixed!

I'm not sure exactly what was causing the errors, but with all of the work done (for other fixes), this is no longer an issue.

Thank you for the bug report.

image