pub struct FluidGlassArgs {Show 22 fields
pub tint_color: Color,
pub shape: Shape,
pub blur_radius: f32,
pub dispersion_height: f32,
pub chroma_multiplier: f32,
pub refraction_height: f32,
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: Option<DimensionValue>,
pub height: Option<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,
}
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: Color
The 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: Shape
The shape of the component, an enum that can be RoundedRectangle
or Ellipse
.
blur_radius: f32
The radius for the background blur effect. A value of 0.0
disables the blur.
dispersion_height: f32
The height of the chromatic dispersion effect.
chroma_multiplier: f32
Multiplier for the chromatic aberration, enhancing the color separation effect.
refraction_height: f32
The height of the refraction effect, simulating light bending through the glass.
refraction_amount: f32
The amount of refraction to apply.
eccentric_factor: f32
Controls the shape and eccentricity of the highlight.
noise_amount: f32
The amount of noise to apply over the surface, adding texture.
noise_scale: f32
The scale of the noise pattern.
time: f32
A time value, typically used to animate the noise or other effects.
contrast: Option<f32>
The contrast adjustment factor.
width: Option<DimensionValue>
The optional width of the component, defined as a DimensionValue
.
height: Option<DimensionValue>
The optional height of the component, defined as a DimensionValue
.
padding: Dp
§ripple_center: Option<[f32; 2]>
§ripple_radius: Option<f32>
§ripple_alpha: Option<f32>
§ripple_strength: Option<f32>
§on_click: Option<Arc<dyn Fn() + Send + Sync>>
§border: Option<GlassBorder>
§block_input: bool
Whether to block input events on the glass surface.
When true
, the surface will consume all input events, preventing interaction with underlying components.
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 moreAuto 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> 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()
.