summaryrefslogtreecommitdiff
path: root/docs/guide/typescript
diff options
context:
space:
mode:
authorAylur <[email protected]>2025-01-16 17:37:00 +0100
committerAylur <[email protected]>2025-01-16 17:37:04 +0100
commit9e8634d892c559c5b44565a68bf35b13cbcb5572 (patch)
tree36a8b911e919959cdf64d3c64646f5066c6a2523 /docs/guide/typescript
parentbc796ac226800c43e724e27f53f410c157acaffe (diff)
add: gtk3 ts popover example
closes #224 closes #157
Diffstat (limited to 'docs/guide/typescript')
-rw-r--r--docs/guide/typescript/examples.md8
-rw-r--r--docs/guide/typescript/faq.md8
2 files changed, 12 insertions, 4 deletions
diff --git a/docs/guide/typescript/examples.md b/docs/guide/typescript/examples.md
index ec51e89..ff1d9a1 100644
--- a/docs/guide/typescript/examples.md
+++ b/docs/guide/typescript/examples.md
@@ -2,13 +2,13 @@
## Gtk3
-### [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/js/simple-bar)
+### [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/simple-bar)
![simple-bar](https://github.com/user-attachments/assets/a306c864-56b7-44c4-8820-81f424f32b9b)
-### [Notification Popups](https://github.com/Aylur/astal/tree/main/examples/js/notifications)
+### [Notification Popups](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/notifications)
![notification-popups](https://github.com/user-attachments/assets/0df0eddc-5c74-4af0-a694-48dc8ec6bb44)
-### [Applauncher](https://github.com/Aylur/astal/tree/main/examples/js/applauncher)
+### [Applauncher](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/applauncher)
![launcher](https://github.com/user-attachments/assets/2695e3bb-dff4-478a-b392-279fe638bfd3)
-### [Media Player](https://github.com/Aylur/astal/tree/main/examples/js/media-player)
+### [Media Player](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/media-player)
![media-player](https://github.com/user-attachments/assets/891e9706-74db-4505-bd83-c3628d7b4fd0)
diff --git a/docs/guide/typescript/faq.md b/docs/guide/typescript/faq.md
index 132900a..15a97e5 100644
--- a/docs/guide/typescript/faq.md
+++ b/docs/guide/typescript/faq.md
@@ -299,3 +299,11 @@ focusable set its keymode.
/>
```
:::
+
+## How to create a Popup
+
+In Gtk4 simply use Gtk's builtin [Popover](https://docs.gtk.org/gtk4/class.Popover.html).
+
+In Gtk3 you can create an [Astal.Window](https://aylur.github.io/libastal/astal3/class.Window.html) and handle click events.
+
+Checkout [examples/gtk3/js/popover](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/popover)