pub struct HoverAlpha {
pub rest: f32,
pub peak: f32,
}Expand description
Configuration for El::hover_alpha — the rest and peak alpha
endpoints for a node whose opacity binds to the subtree
interaction envelope (max of hover, focus, and press over the
subtree rooted at this node).
rest is the drawn alpha when no descendant of this node is
currently the active hover, focus, or press target. peak is the
drawn alpha at full envelope. Linear interpolation between the two
follows the eased subtree envelope (0..1).
Both fields are clamped to [0.0, 1.0] by El::hover_alpha.
Typical use is rest < peak (“reveal on interaction”), but the
representation accepts rest > peak (“fade out on interaction”) and
sub-1.0 peaks for subtle affordances.
Fields§
§rest: f32§peak: f32Trait Implementations§
Source§impl Clone for HoverAlpha
impl Clone for HoverAlpha
Source§fn clone(&self) -> HoverAlpha
fn clone(&self) -> HoverAlpha
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 moreSource§impl Debug for HoverAlpha
impl Debug for HoverAlpha
Source§impl PartialEq for HoverAlpha
impl PartialEq for HoverAlpha
Source§fn eq(&self, other: &HoverAlpha) -> bool
fn eq(&self, other: &HoverAlpha) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for HoverAlpha
impl StructuralPartialEq for HoverAlpha
Auto Trait Implementations§
impl Freeze for HoverAlpha
impl RefUnwindSafe for HoverAlpha
impl Send for HoverAlpha
impl Sync for HoverAlpha
impl Unpin for HoverAlpha
impl UnsafeUnpin for HoverAlpha
impl UnwindSafe for HoverAlpha
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.