Skip to content

Releases: kdroidFilter/ComposeNativeTray

0.6.9

08 Jul 19:29
Compare
Choose a tag to compare

📦 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.

⚠️ 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

08 Jul 19:09
bba375d
Compare
Choose a tag to compare

📦 ComposeNativeTray 0.6.8

✨ What's new

  • Primary Action Label Parameter Renamed

    • The parameter primaryActionLinuxLabel has been renamed to primaryActionLabel.
    • 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.
  • 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 with primaryActionLabel in your code.

0.6.7

24 Jun 08:14
c263dfe
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6.6...v0.6.7

0.6.6

10 Jun 02:12
d76d9e0
Compare
Choose a tag to compare

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

08 Jun 20:41
3083a57
Compare
Choose a tag to compare

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

15 May 12:43
46aa240
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6.3...v0.6.4

0.6.3

12 May 18:41
412c36b
Compare
Choose a tag to compare

🌒 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

10 May 18:22
0f2f192
Compare
Choose a tag to compare

🎉 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
    New SingleInstanceManager.Configuration class allows setting custom lockFilesDir and lockIdentifier.

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

01 May 18:19
Compare
Choose a tag to compare

🎉 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

28 Apr 12:19
60c1276
Compare
Choose a tag to compare

🎉 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