pub struct GradientButtonDecoration { /* private fields */ }Expand description
A ButtonDecoration painting gradient fill/overlay/outline/foreground
layers — the reference’s M3EButtonDecoration gradient quadruple
(backgroundGradient/overlayGradient/outlineGradient/
foregroundGradient, m3e_button_decoration.dart:83-:92) realized
against this crate’s ButtonDecoration seam. See the module docs
for the full gradient-class inventory and scope notes.
Implementations§
Source§impl GradientButtonDecoration
impl GradientButtonDecoration
Sourcepub fn new() -> Self
pub fn new() -> Self
A decoration with no layer configured — every hook falls through to
DecorationOutcome::Skipped/None until a layer is set.
Sourcepub fn background(self, property: GradientProperty) -> Self
pub fn background(self, property: GradientProperty) -> Self
Set the container fill gradient (backgroundGradient).
Sourcepub fn foreground(self, property: GradientProperty) -> Self
pub fn foreground(self, property: GradientProperty) -> Self
Set the label ink gradient (foregroundGradient). See
ButtonDecoration::foreground_brush for the label-only scope note.
Sourcepub fn overlay(self, property: GradientProperty) -> Self
pub fn overlay(self, property: GradientProperty) -> Self
Set the interaction state-layer gradient (overlayGradient).
Sourcepub fn outline(self, property: GradientProperty) -> Self
pub fn outline(self, property: GradientProperty) -> Self
Set the hairline gradient (outlineGradient).
Trait Implementations§
Source§impl ButtonDecoration for GradientButtonDecoration
impl ButtonDecoration for GradientButtonDecoration
Source§fn paint_fill(
&self,
surface: &ButtonSurface,
scene: &mut dyn PaintScene,
) -> DecorationOutcome
fn paint_fill( &self, surface: &ButtonSurface, scene: &mut dyn PaintScene, ) -> DecorationOutcome
DecorationOutcome::Painted suppresses the
core’s own solid fill.Source§fn paint_overlay(
&self,
surface: &ButtonSurface,
scene: &mut dyn PaintScene,
) -> DecorationOutcome
fn paint_overlay( &self, surface: &ButtonSurface, scene: &mut dyn PaintScene, ) -> DecorationOutcome
DecorationOutcome::Painted
suppresses the core’s own interaction state layer — mirroring
m3e_button_style.dart:47, where a gradient overlay forces
overlayColor to transparent so the two never stack.Source§fn paint_outline(
&self,
surface: &ButtonSurface,
scene: &mut dyn PaintScene,
) -> DecorationOutcome
fn paint_outline( &self, surface: &ButtonSurface, scene: &mut dyn PaintScene, ) -> DecorationOutcome
DecorationOutcome::Painted suppresses the core’s
own hairline.Source§fn foreground_brush(&self, surface: &ButtonSurface) -> Option<Brush>
fn foreground_brush(&self, surface: &ButtonSurface) -> Option<Brush>
Source§impl Clone for GradientButtonDecoration
impl Clone for GradientButtonDecoration
Auto Trait Implementations§
impl !RefUnwindSafe for GradientButtonDecoration
impl !Send for GradientButtonDecoration
impl !Sync for GradientButtonDecoration
impl !UnwindSafe for GradientButtonDecoration
impl Freeze for GradientButtonDecoration
impl Unpin for GradientButtonDecoration
impl UnsafeUnpin for GradientButtonDecoration
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.