Releases: kdroidFilter/ComposeNativeTray
0.6.9
📦 ComposeNativeTray 0.6.9
🐛 Bug Fix
-
macOS primaryActionLabel fix
- In version 0.6.8, the primary action label on macOS was always hardcoded to "Open", ignoring the user-specified
primaryActionLabel
. - This release ensures that the correct custom label is now displayed as the first menu item on macOS, matching the intended behavior on Linux.
- In version 0.6.8, the primary action label on macOS was always hardcoded to "Open", ignoring the user-specified
⚠️ Reminder
- Make sure you’re using the new unified
primaryActionLabel
parameter in your code (introduced in 0.6.8) to define the label for both Linux and macOS.
0.6.8
📦 ComposeNativeTray 0.6.8
✨ What's new
-
Primary Action Label Parameter Renamed
- The parameter
primaryActionLinuxLabel
has been renamed toprimaryActionLabel
. - Important: You must update your code to use the new
primaryActionLabel
parameter when defining the label for the primary action menu item. - This change reflects that the same label is now used on both Linux and macOS.
- The parameter
-
macOS Menu Workaround Added
- On macOS, the primary action is now added as the first item in the tray menu, similar to the Linux workaround.
- This ensures consistent behavior across platforms, even though macOS does not support direct left-click primary actions without a custom NSView.
- Documentation has been updated to clarify this platform behavior.
📚 Updated Documentation
-
Clarified macOS tray behavior:
- Left-click always opens the tray menu.
- Right-click is not supported on macOS.
- Primary action is shown as the first menu item when defined.
⚠️ Breaking Change
- Be sure to replace
primaryActionLinuxLabel
withprimaryActionLabel
in your code.
0.6.7
What's Changed
- Bump co.touchlab:kermit from 2.0.5 to 2.0.6 by @dependabot in #187
- Bump kotlin from 2.1.21 to 2.2.0 by @dependabot in #197
- Bump com.vanniktech.maven.publish from 0.32.0 to 0.33.0 by @dependabot in #196
- Bump io.github.kdroidfilter:platformtools.core from 0.2.9 to 0.4.0 by @dependabot in #190
Full Changelog: v0.6.6...v0.6.7
0.6.6
What's Changed
- Fixed init exception handling - also catching Throwable to handle UnsatisfiedLinkError by @badmannersteam in #182
Full Changelog: 0.6.5...v0.6.6
0.6.5
What's Changed
- Handling init exceptions and fallback to AWT impl if native impl failed to init by @badmannersteam in #175
Full Changelog: v0.6.4...0.6.5
0.6.4
What's Changed
- Bump com.vanniktech.maven.publish from 0.31.0 to 0.32.0 by @dependabot in #160
- Bump kotlin from 2.1.20 to 2.1.21 by @dependabot in #158
Full Changelog: v0.6.3...v0.6.4
0.6.3
🌒 ComposeNativeTray 0.6.3 Release
We're excited to announce ComposeNativeTray v0.6.3, which introduces support for Windows dark mode menus 🎉
Context menu items on Windows 10+ will now follow the system's light/dark theme automatically, providing a more native and visually consistent experience for your users. Fix #156
🆕 What's New
-
🌙 Dark Mode Support (Windows)
- Windows tray menus now opt-in to dark mode automatically on supported versions (Windows 10 1809+).
- No configuration needed — the appearance adapts dynamically to the system theme.
📌 Full Changelog:
v0.6.2...v0.6.3
0.6.2
🎉 ComposeNativeTray 0.6.2 Release
We're excited to announce the release of ComposeNativeTray v0.6.2, which brings extended control over the SingleInstanceManager
, allowing you to customize the lock file location and identifier.
Special thanks to @badmannersteam for contributing this feature in #151 ! 🙌
Also, Compose has been updated to version 1.8.0 in #153
What's New ✨
- 🎛️ SingleInstanceManager Configuration
NewSingleInstanceManager.Configuration
class allows setting customlockFilesDir
andlockIdentifier
.
Example Usage 💻
// 1. Configure before any call to isSingleInstance
SingleInstanceManager.configuration = Configuration(
lockFilesDir = Paths.get("/data/myApp/single_instance"),
lockIdentifier = "my_app_unique"
)
Thanks again to the community for your contributions and feedback!
Full Changelog: v0.6.1...v0.6.2
0.6.1
🎉 ComposeNativeTray 0.6.1 Release
We're excited to announce the release of ComposeNativeTray v0.6.1, which introduces important improvements to icon rendering and customization.
What's New ✨
Icon Scaling and Aliasing Customization 🎨
This release adds public exposure of icon render properties, giving you more control over how your tray icons appear across different platforms:
- ✅ Added
IconRenderProperties
class for fine-tuning tray icon rendering - 🖥️ Provided platform-specific optimizations with
forCurrentOperatingSystem()
factory method - 🔧 Added option to disable forced scaling and aliasing with
withoutScalingAndAliasing()
method - 🔍 Exposed customization parameters for scene dimensions and density
Example Usage 💻
// Use platform-optimized settings (Windows: 32x32, macOS: 44x44, Linux: 24x24)
IconRenderProperties.forCurrentOperatingSystem(
sceneWidth = 192, // Optional: Width of the compose scene
sceneHeight = 192, // Optional: Height of the compose scene
density = Density(2f) // Optional: Density for the compose scene
)
// Or disable forced scaling and aliasing
IconRenderProperties.withoutScalingAndAliasing(
sceneWidth = 192,
sceneHeight = 192,
density = Density(2f)
)
Contributors 👥
Special thanks to @badmannersteam for their first contribution to the project! 🎉
Links 🔗
v0.6.0
🎉 ComposeNativeTray 0.6.0 Release
🚀 Major New Feature: Composable Icon Content
We're excited to announce version 0.6.0 of ComposeNativeTray with a significant improvement that makes the library much simpler to use!
🖼️ Composable Icon Content
The Tray component now accepts a iconContent
parameter that takes a Composable function, allowing you to define your tray icon directly using Compose UI components:
Tray(
iconContent = {
Icon(
Icons.Default.Favorite,
contentDescription = "",
tint = Color.White,
modifier = Modifier.fillMaxSize() // Important for proper sizing
)
},
tooltip = "My Application",
primaryAction = { /* your action here */ },
primaryActionLinuxLabel = "Open Application"
) {
// Menu content...
}
✨ Benefits
- 🔄 Simplified Usage: No need to manage separate icon files for different platforms
- 🎭 Dynamic Icons: Easily change your tray icon at runtime based on application state
- 🧩 Consistent with Compose: Follows the Compose paradigm of declarative UI
- 🌐 Cross-Platform: Works seamlessly across Windows, macOS, and Linux
🛠️ Implementation Details
The library now handles:
- 🖌️ Rendering your Composable to appropriate image formats (PNG, ICO) behind the scenes
- 📏 Proper scaling and density handling for different platforms
- ⚡ Efficient recomposition when your icon content changes
⚠️ Important Note
When using a Composable for the tray icon, it's crucial to apply the Modifier.fillMaxSize()
to your Composable. This ensures that the Composable fills the entire image when it's converted to an icon.
📢 Deprecation Notice
The previous method of providing icon file paths is now deprecated:
// Deprecated
Tray(
iconPath = "path/to/icon.png",
windowsIconPath = "path/to/windows_icon.ico",
// other parameters...
)
Please update your code to use the new iconContent
parameter for a better experience.
As always, thank you for using ComposeNativeTray! 💖 We hope this update makes your development experience even better.
Full Changelog: v0.5.5...v0.6.0