pub struct ScrimConfig {
pub color: Color,
pub on_tap: Option<Arc<dyn Fn() + Send + Sync>>,
pub exclude_rect: Option<Rect>,
}Expand description
Optional translucent background drawn before the overlay widget.
Fields§
§color: Color§on_tap: Option<Arc<dyn Fn() + Send + Sync>>If Some, called when a tap lands outside the overlay widget’s rect.
exclude_rect: Option<Rect>A rect (in window space) that is exempt from on_tap even though
it’s outside the overlay widget itself — e.g. a Dropdown’s own
trigger button. Without this, clicking the trigger that opened the
overlay both fires on_tap (closing it) AND falls through to the
trigger’s own base-tree click handler (reopening it) in the same
event, so the dropdown could never close via its own trigger.
Trait Implementations§
Source§impl Clone for ScrimConfig
impl Clone for ScrimConfig
Source§fn clone(&self) -> ScrimConfig
fn clone(&self) -> ScrimConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ScrimConfig
impl !UnwindSafe for ScrimConfig
impl Freeze for ScrimConfig
impl Send for ScrimConfig
impl Sync for ScrimConfig
impl Unpin for ScrimConfig
impl UnsafeUnpin for ScrimConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more