You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,8 @@
25
25
- Improves the appearance of the tray on Linux, which previously resembled Windows 95.
26
26
- Adds support for checkable items, dividers, and submenus, including nested submenus.
27
27
- Supports primary action for Windows, macOS, and Linux.
28
-
- On Windows and macOS, the primary action is triggered by a left-click on the tray icon.
28
+
- On Windows, the primary action is triggered by a left-click on the tray icon.
29
+
- On macOS, left-clicking opens the tray menu (macOS convention) while right-clicking has no effect. The primary action is added as the first item in the menu.
29
30
- On Linux, due to the limitations of `libappindicator`, the primary action creates an item at the top of the context menu (with a customizable label). If the context menu is empty, the library uses `gtkstatusicon` to capture the primary action without needing to add an item to the context menu.
30
31
-**Single Instance Management**: Ensures that only one instance of the application can run at a time and allows restoring focus to the running instance when another instance is attempted.
31
32
-**Tray Position Detection**: Allows determining the position of the system tray, which helps in positioning related windows appropriately.
@@ -53,7 +54,7 @@ To use the ComposeTray library, add it as a dependency in your `build.gradle.kts
* @param windowsIconPath The file path to the tray icon specifically for Windows. Defaults to the value of `iconPath`.
147
147
* @param tooltip The tooltip text to be displayed when the user hovers over the tray icon.
148
148
* @param primaryAction An optional callback to be invoked when the tray icon is clicked (handled only on specific platforms).
149
-
* @param primaryActionLinuxLabel The label for the primary action on Linux. Defaults to "Open".
149
+
* @param primaryActionLabel The label for the primary action on Linux and macOS. Defaults to "Open".
150
150
* @param menuContent A lambda that builds the tray menu using a `TrayMenuBuilder`. Define the menu structure, including items, checkable items, dividers, and submenus.
151
151
*
152
152
* @deprecated Use the version with composable icon content instead
153
153
*/
154
154
@Deprecated(
155
155
message ="Use the version with composable icon content instead",
val absoluteIconPath = remember(iconPath) { extractToTempIfDifferent(iconPath)?.absolutePath.orEmpty() }
@@ -174,15 +174,15 @@ fun ApplicationScope.Tray(
174
174
absoluteWindowsIconPath,
175
175
tooltip,
176
176
primaryAction,
177
-
primaryActionLinuxLabel,
177
+
primaryActionLabel,
178
178
menuContent
179
179
) {
180
180
val tray =NativeTray(
181
181
iconPath = absoluteIconPath,
182
182
windowsIconPath = absoluteWindowsIconPath,
183
183
tooltip = tooltip,
184
184
primaryAction = primaryAction,
185
-
primaryActionLinuxLabel=primaryActionLinuxLabel,
185
+
primaryActionLabel=primaryActionLabel,
186
186
menuContent = menuContent
187
187
)
188
188
@@ -201,7 +201,7 @@ fun ApplicationScope.Tray(
201
201
* @param iconRenderProperties Properties for rendering the icon.
202
202
* @param tooltip The tooltip text to be displayed when the user hovers over the tray icon.
203
203
* @param primaryAction An optional callback to be invoked when the tray icon is clicked (handled only on specific platforms).
204
-
* @param primaryActionLinuxLabel The label for the primary action on Linux. Defaults to "Open".
204
+
* @param primaryActionLabel The label for the primary action on Linux and macOS. Defaults to "Open".
205
205
* @param menuContent A lambda that builds the tray menu using a `TrayMenuBuilder`. Define the menu structure, including items, checkable items, dividers, and submenus.
0 commit comments