Skip to content

Commit 7dfb8be

Browse files
committed
Update to version 0.6.0 and refine README documentation
Updated README to remove experimental API warning and outdated sections, simplifying the content. Incremented library version to 0.6.0 in `build.gradle.kts` to reflect the changes and improvements.
1 parent d47074f commit 7dfb8be

2 files changed

Lines changed: 5 additions & 24 deletions

File tree

README.md

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
**Compose Native Tray** is a Kotlin library that provides a simple way to create system tray applications with native support for Linux, Windows, and macOS. This library was created to address several issues with the Compose for Desktop tray, including poor HDPI support on Windows and Linux, as well as the outdated appearance of the tray on Linux, which resembled Windows 95. In addition to these fixes, ComposeTray also adds support for checkable items, dividers, submenus, and even nested submenus, offering a more feature-rich and modern solution. The Linux implementation uses GTK, while macOS uses AWT, and the Windows implementation is based on native system calls. Additionally, it allows you to enable or disable individual tray items dynamically. This library allows you to add a system tray icon, tooltip, and menu with various options in a Kotlin DSL-style syntax.
88

9-
> **Warning**: This library is highly experimental, and its APIs are subject to change.
109

1110
## ✨ Features
1211

@@ -46,7 +45,7 @@ To use the ComposeTray library, add it as a dependency in your `build.gradle.kts
4645

4746
```kotlin
4847
dependencies {
49-
implementation("io.github.kdroidfilter:composenativetray:0.5.5")
48+
implementation("io.github.kdroidfilter:composenativetray:0.6.0")
5049
}
5150
```
5251

@@ -132,24 +131,6 @@ application {
132131
- **dispose**: Call to remove the system tray icon and exit gracefully.
133132
- **Primary Action**: An action triggered by a left-click on the tray icon (Windows and macOS) or as a top item in the context menu (Linux).
134133

135-
### 🖥️ Platform-Specific Implementation
136-
The `NativeTray` class automatically detects the operating system and initializes the appropriate tray implementation:
137-
- **Linux**: Uses `LinuxTrayInitializer`, which is implemented using GTK via JNA.
138-
- **Windows**: Uses `WindowsTrayInitializer`, which is based on the [tray library by dmikushin](https://github.com/dmikushin/tray).
139-
- **macOS**: Uses `AwtTrayInitializer`, which is implemented using AWT.
140-
141-
> Note: The library now accepts a Composable for the tray icon instead of file paths. The Composable is converted to the appropriate image format for each platform automatically.
142-
143-
### 🗂️ Windows DLL Generation
144-
To generate the Windows DLL, execute the following command:
145-
```bash
146-
gcc -shared -o ../resources/win32-x86-64/tray.dll tray_windows.c
147-
````
148-
149-
### 📜 Logging
150-
151-
This example uses the `kmplog` library for logging, which allows you to log messages when certain items are selected or toggled.
152-
153134
### 🔄 Single Instance Management
154135

155136
The `SingleInstanceManager` ensures that only one instance of the application is running at a time. When a second instance tries to start, it sends a restore request to the existing instance to bring it to the foreground.
@@ -226,9 +207,9 @@ Feel free to open issues or pull requests if you find any bugs or have suggestio
226207

227208
## ✅ Things to Implement
228209

229-
- ✅ Implement a system to check if an instance of the application is already running
230-
- ✅ Add the ability to locate the position of the systray (top left, top right, etc.)
231-
- Add the ability to dynamically change the tray icon
210+
-~~Implement a system to check if an instance of the application is already running~~
211+
-~~Add the ability to locate the position of the systray (top left, top right, etc.)~~
212+
- ~~Add the ability to dynamically change the tray icon~~
232213

233214
## 🙏 Acknowledgements
234215

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
}
1111

1212
group = "com.kdroid.composenativetray"
13-
version = "0.5.5"
13+
version = "0.6.0"
1414

1515
repositories {
1616
mavenCentral()

0 commit comments

Comments
 (0)