Module overlay
Expand description
The window’s top layer: what modal and anchored surfaces share.
A modal Panel (crate::widget::ModalDialog) and an anchored one
(crate::widget::Popover) paint in the host’s top-layer pass
(crate::widget::Widget::draw_overlay), after the app and the window’s
own chrome, so a modal’s scrim covers the whole window. This module holds
what they have in common: the keyboard FocusTrap and the scrim
painters.
Modules§
- focus_
trap - scrim
- Scrims: the dim behind a modal Panel and the fade under text on media.
Structs§
- Focus
Trap - A ring of focusable ids that keyboard focus cycles within while a modal is
up.
next_from/prev_fromwrap at the ends so Tab from the last member returns to the first (and Shift+Tab from the first wraps to the last), keeping focus inside the modal rather than escaping to the content behind.