pub struct FluidGlassArgs {Show 26 fields
pub tint_color: Color,
pub shape: Shape,
pub blur_radius: Dp,
pub dispersion_height: Dp,
pub chroma_multiplier: f32,
pub refraction_height: Dp,
pub refraction_amount: f32,
pub eccentric_factor: f32,
pub noise_amount: f32,
pub noise_scale: f32,
pub time: f32,
pub contrast: Option<f32>,
pub width: DimensionValue,
pub height: DimensionValue,
pub padding: Dp,
pub ripple_center: Option<[f32; 2]>,
pub ripple_radius: Option<f32>,
pub ripple_alpha: Option<f32>,
pub ripple_strength: Option<f32>,
pub on_click: Option<Arc<dyn Fn() + Send + Sync>>,
pub border: Option<GlassBorder>,
pub block_input: bool,
pub accessibility_role: Option<Role>,
pub accessibility_label: Option<String>,
pub accessibility_description: Option<String>,
pub accessibility_focusable: bool,
}Expand description
Arguments for the fluid_glass component, providing extensive control over its appearance.
This struct uses the builder pattern for easy construction.
Fields§
§tint_color: ColorThe tint color of the glass.
The alpha channel uniquely and directly controls the tint strength.
A=0.0 means no tint (100% background visibility).
A=1.0 means full tint (100% color visibility).
shape: ShapeThe shape of the component, an enum that can be RoundedRectangle or Ellipse.
blur_radius: DpThe radius for the background blur effect. A value of 0.0 disables the blur.
dispersion_height: DpThe height of the chromatic dispersion effect.
chroma_multiplier: f32Multiplier for the chromatic aberration, enhancing the color separation effect.
refraction_height: DpThe height of the refraction effect, simulating light bending through the glass.
refraction_amount: f32The amount of refraction to apply.
eccentric_factor: f32Controls the shape and eccentricity of the highlight.
noise_amount: f32The amount of noise to apply over the surface, adding texture.
noise_scale: f32The scale of the noise pattern.
time: f32A time value, typically used to animate the noise or other effects.
contrast: Option<f32>The contrast adjustment factor.
width: DimensionValueThe optional width of the component, defined as a DimensionValue.
height: DimensionValueThe optional height of the component, defined as a DimensionValue.
padding: DpPadding inside the glass component.
ripple_center: Option<[f32; 2]>Optional normalized center (x, y) for the ripple animation on click.
ripple_radius: Option<f32>Optional ripple radius, expressed in normalized coordinates relative to the surface.
ripple_alpha: Option<f32>Optional ripple tint alpha (0.0 = transparent, 1.0 = opaque).
ripple_strength: Option<f32>Strength multiplier for the ripple distortion.
on_click: Option<Arc<dyn Fn() + Send + Sync>>Optional click callback for interactive glass surfaces.
border: Option<GlassBorder>Optional border defining the outline thickness for the glass.
block_input: boolWhether to block input events on the glass surface.
When true, the surface will consume all input events, preventing interaction with underlying components.
accessibility_role: Option<Role>Optional accessibility role override; defaults to Role::Button when interactive.
accessibility_label: Option<String>Optional label announced by assistive technologies.
accessibility_description: Option<String>Optional description announced by assistive technologies.
accessibility_focusable: boolWhether the surface should be focusable even when not interactive.
Trait Implementations§
Source§impl Clone for FluidGlassArgs
impl Clone for FluidGlassArgs
Source§fn clone(&self) -> FluidGlassArgs
fn clone(&self) -> FluidGlassArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for FluidGlassArgs
impl Default for FluidGlassArgs
Source§impl PartialEq for FluidGlassArgs
impl PartialEq for FluidGlassArgs
Auto Trait Implementations§
impl Freeze for FluidGlassArgs
impl !RefUnwindSafe for FluidGlassArgs
impl Send for FluidGlassArgs
impl Sync for FluidGlassArgs
impl Unpin for FluidGlassArgs
impl !UnwindSafe for FluidGlassArgs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().