Tray

@Composable
fun ApplicationScope.Tray(iconPath: String, windowsIconPath: String = iconPath, tooltip: String, primaryAction: () -> Unit? = null, primaryActionLinuxLabel: String = "Open", menuContent: TrayMenuBuilder.() -> Unit? = null)

Configures and displays a system tray icon for the application with platform-specific behavior and menu options.

Parameters

iconPath

The file path to the tray icon. This should be a valid image file compatible with the platform's tray requirements.

windowsIconPath

The file path to the tray icon specifically for Windows. Defaults to the value of iconPath.

tooltip

The tooltip text to be displayed when the user hovers over the tray icon.

primaryAction

An optional callback to be invoked when the tray icon is clicked (handled only on specific platforms).

primaryActionLinuxLabel

The label for the primary action on Linux. Defaults to "Open".

menuContent

A lambda that builds the tray menu using a TrayMenuBuilder. Define the menu structure, including items, checkable items, dividers, and submenus.