mirror of
https://codeberg.org/waydeer/layer-shika.git
synced 2025-12-23 15:45:55 +00:00
777 B
777 B
simple-popup
Small example that demonstrates:
- Showing a popup with
shell.popups().builder(...) - Content-based sizing (manual) using a Slint
Timerto callresize_popup(width, height) - Multiple simultaneous popups (one at cursor, one centered)
This example intentionally keeps the popup “resize callback” pattern, since the popup window size cannot be tracked automatically.
Run
From the layer-shika workspace root:
cargo run -p simple-popup
Notes
- Popups are transient windows intended for menus/tooltips/dialogs.
- For
PopupSize::Content, the popup starts small and then requests a resize once layout stabilizes. - If you don’t see the popup, make sure your compositor supports
xdg-shellpopups and that the surface is focused.