Hey Kotlin enthusiasts! :wave: I'm thrilled to sh...
# feed
u
Hey Kotlin enthusiasts! 👋 I'm thrilled to share that I've just released Compose Native Tray v0.4.0! This update brings some exciting new features: • Compose Recomposition Support: You can now dynamically show/hide the tray based on state changes in Compose. 🎉Single Instance Management: This feature ensures that only one instance of your app runs at a time, helping to keep your application focused and prevent multiple instances. • Dynamic Tray Position Detection & Tray Window Positioning: This feature allows for dynamic detection of the tray's position on Windows and Linux, enabling better alignment of windows with the tray. (macOS still defaults to
TOP_RIGHT
for now). Additionally, the
getTrayWindowPosition(windowWidth: Int, windowHeight: Int)
function helps determine the appropriate position for a window based on the tray's location, ensuring a seamless user experience. • Primary Action Handling on Linux: If the context menu on Linux is empty, the library now uses
gtkstatusicon
to capture the primary action without requiring an item in the context menu. This version makes it easier than ever to build reliable and polished system tray applications with Kotlin. Check it out on GitHub, and I'd love to hear your thoughts or feedback! 👉 Check here ! Happy coding!
👀 1
K 5
m
I was excited to try it, but I am running into some issues. I am trying it on Linux KDE, and it looks like this: Obviously it shouldn't look like that. If I try to specify icons, it completely crashes, the menu opens on a different monitor than the tray icon is, and the tray icon itself doesn't render the icon correctly.
For comparison, here is how it's supposed to look, using my existing solution:
u
Are you sure you use my library ? Check your implementation, I check it on KDE, it's work nice. It seem like you're using the official api of compose
m
You are correct, looks like I've got imports mixed up and the API being almost identical I didn't even notice because it still worked. It works correctly, but it looks like your library doesn't let me add icons to the items? Which means I am unable to achieve what I currently have, like on the screenshot above.
u
Yes, that's right, that's one of the things I have to add. 🙂
m
Looking forward to it then!
u
me too !