diff --git a/docs/src/content/docs/learn/systray.mdx b/docs/src/content/docs/learn/systray.mdx index fb2c84589..5e352ce09 100644 --- a/docs/src/content/docs/learn/systray.mdx +++ b/docs/src/content/docs/learn/systray.mdx @@ -2,7 +2,7 @@ title: System Tray description: Learn how to create and use system tray icons in Wails --- -import {Badge} from '@astrojs/starlight/components'; + ## Introduction @@ -167,16 +167,16 @@ Explore these examples for more advanced usage: ## API Reference ### Core Methods -| Method | Description | -|--------------------------------|--------------------------------------------| -| `NewSystemTray()` | Creates a new system tray instance | -| `Run()` | Starts the system tray | -| `SetLabel(label string)` | Sets the text label | -| `SetIcon(icon []byte)` | Sets the icon image | -| `SetDarkModeIcon(icon []byte)` | Sets the dark mode variant of the icon | -| `SetTemplateIcon(icon []byte)` | Marks the icon as a template image (macOS) | -| `SetIconPosition(position int)`| Sets the icon position (macOS) | -| `Destroy()` | Destroys the system tray | +| Method | Description | +|------------------------------------------|--------------------------------------------| +| `NewSystemTray()` | Creates a new system tray instance | +| `Run()` | Starts the system tray | +| `SetLabel(label string)` | Sets the text label | +| `SetIcon(icon []byte)` | Sets the icon image | +| `SetDarkModeIcon(icon []byte)` | Sets the dark mode variant of the icon | +| `SetTemplateIcon(icon []byte)` | Marks the icon as a template image (macOS) | +| `SetIconPosition(position IconPosition)` | Sets the icon position (macOS) | +| `Destroy()` | Destroys the system tray | ### Menu Management | Method | Description | diff --git a/v3/pkg/application/systemtray_linux.go b/v3/pkg/application/systemtray_linux.go index ae89c7e78..801bde339 100644 --- a/v3/pkg/application/systemtray_linux.go +++ b/v3/pkg/application/systemtray_linux.go @@ -112,7 +112,7 @@ func (i systrayMenuItem) dbus() *dbusMenu { return item } -func (s *linuxSystemTray) setIconPosition(position int) { +func (s *linuxSystemTray) setIconPosition(position IconPosition) { s.iconPosition = position } diff --git a/v3/pkg/application/systemtray_windows.go b/v3/pkg/application/systemtray_windows.go index 3f2ed89d6..11a24d41d 100644 --- a/v3/pkg/application/systemtray_windows.go +++ b/v3/pkg/application/systemtray_windows.go @@ -377,7 +377,7 @@ func (s *windowsSystemTray) setTemplateIcon(_ []byte) { // Unsupported - do nothing } -func (s *windowsSystemTray) setIconPosition(position int) { +func (s *windowsSystemTray) setIconPosition(position IconPosition) { // Unsupported - do nothing }