File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -537,8 +537,7 @@ Use TrayApp when you want a compact companion window (like a quick settings or m
537537- menu: optional tray context menu (see Tray menu DSL).
538538- content: the composable content of the popup window.
539539
540- ### Examples
541- Minimal with ImageVector:
540+ ### Example
542541
543542``` kotlin
544543@OptIn(ExperimentalTrayAppApi ::class )
@@ -560,47 +559,6 @@ application {
560559}
561560```
562561
563- Using a Painter:
564-
565- ``` kotlin
566- @OptIn(ExperimentalTrayAppApi ::class )
567- application {
568- TrayApp (
569- icon = painterResource(Res .drawable.icon),
570- tooltip = " My App"
571- ) {
572- /* popup */
573- }
574- }
575- ```
576-
577- Platform-specific icons:
578-
579- ``` kotlin
580- @OptIn(ExperimentalTrayAppApi ::class )
581- application {
582- TrayApp (
583- windowsIcon = painterResource(Res .drawable.icon),
584- macLinuxIcon = Icons .Default .Book ,
585- tint = null , // or provide a tint if desired
586- tooltip = " My App"
587- ) { /* popup */ }
588- }
589- ```
590-
591- Custom composable icon with fade:
592-
593- ``` kotlin
594- @OptIn(ExperimentalTrayAppApi ::class )
595- application {
596- TrayApp (
597- iconContent = { Icon (Icons .Default .Book , contentDescription = null ) },
598- fadeDurationMs = 200 ,
599- tooltip = " My App"
600- ) { /* popup */ }
601- }
602- ```
603-
604562See full demo: demo/src/jvmMain/kotlin/com/kdroid/composetray/demo/TrayAppDemo.kt
605563
606564## 📄 License
You can’t perform that action at this time.
0 commit comments